CL_ClanApplication3
The starting place for all applications.
Overview
The application class must be inherited by all ClanLib applications. In your application create a class inheriting CL_ClanApplication, make a global instance of it, and fill in the main() and get_title() functions.
Class members
CL_ClanApplication()
- virtual
~CL_ClanApplication()
- virtual char *
get_title()
- virtual void
init_modules()
- virtual void
deinit_modules()
- virtual int
main( -
int argc, char** argv)
- static CL_ClanApplication *
app
Members with descriptions
CL_ClanApplication()-
Description:
- virtual
~CL_ClanApplication() -
Description:
- virtual char *
get_title() -
Description:
Every program made using ClanLib must implement this function. It returns the title of the application, which depending on the platform on which it is run, will be passed on to the operating system.
Return value:
The application title
- virtual void
init_modules() -
Description:
Before main() is called, or before the datafile compiler is invoked, this function gets called. Use it to initialize libraries.
- virtual void
deinit_modules() -
Description:
Called after main() or after the datafile compiler completes. Use it to shutdown libraries.
- virtual int
main( -
int argc, char** argv)
Parameters: argc - The number of arguments to the program (c-style) argv - A pointer to strings, containing the program arguments. The name of the program executable is always passed as first argument.
Description:
Every program made using ClanLib must implement this function. This is the main application function, which will be called _once_ following system initialization.
Return value:
Program return value
- static CL_ClanApplication *
app -
Description:
Static pointer to an initialized instance of this class. This is set by the constructor.