class application


class application

Description

This class represents the application object. The application object is responsible for all initialization necessary for a particular kind of program to work. This particular class doesn't do anything other than hold common information, like the command line arguments and the copyright notice (if any), but subclasses may do more useful work.

Public Member Functions

application (
    int argc,
    char** argv
)
noexcept

Constructs an application with the given command line arguments.

Parameters:
  • argc:

    The number of arguments given on the command line.

  • argv:

    The array of pointers to the arguments given on the command line.

application (
    const application& other
)
= delete
application&
operator = (
    const application& other
)
= delete
application (
    application&& other
)
noexcept

Move-constructs an application from an existing one.

Parameters:
  • other:

    The application to move from.

application&
operator = (
    application&& other
)
noexcept

Move-assigns an application into this one.

Parameters:
  • other:

    The application to move from.

static
application*
get_instance_ptr ()
noexcept

Returns a pointer to the application object.

int
get_argc ()
const

Returns the number of arguments that were given on the command line.

char**
get_argv ()
const

Returns the array of pointers to the arguments that were given on the command line.

std::u8string
get_copyright_notice ()
const

Returns the copyright notice held in this application object.

void
set_copyright_notice (
    std::u8string_view new_copyright_notice
)

Sets this application object's copyright notice to the one provided.

Parameters:
  • new_copyright_notice:

    The new copyright notice to store in this application object.

virtual
int
run ()

Does nothing except return 0. A subclass may provide a more useful implementation.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2023.