#include <Pt/Cosmo/Main.h>
Inherits Component.
Public Member Functions | |
| Main (int &argc, char **argv, ComponentManager &cm) | |
| Constructs the main component. More... | |
| virtual | ~Main () |
| Destructor. | |
| void | run () |
| Launches the application. More... | |
| void | init (const IComponentType *type, const IComponentDeclaration *decl) |
| Initializes the component. More... | |
| bool | hasFeatureId (const char *featureId) const |
| Returns true if the given feature ID is implemented. More... | |
| const char * | classId () const |
| Returns the class ID. | |
| template<typename I > | |
| I * | queryInterface () |
| Returns the interface or null if not available. | |
Protected Member Functions | |
| virtual void | onInitialize (const IComponentDeclaration &decl) |
| Called when the component is initialized. More... | |
Entry point for a Cosmo-based application. Ties together the ComponentManager, plugin loading, and the application main loop driven by an ILauncher component.
| Main | ( | int & | argc, |
| char ** | argv, | ||
| ComponentManager & | cm | ||
| ) |
| argc | Reference to the argument count. |
| argv | The argument array. |
| cm | The component manager to use. |
| void run | ( | ) |
Loads all registered components and invokes the ILauncher.
|
inherited |
Called by the component plugin after creation. Assigns the component type and declaration, then invokes onInitialize().
| type | The component type providing interface metadata. |
| decl | The instance declaration from the manifest. |
|
inherited |
| featureId | The feature ID to check. |
|
protectedvirtualinherited |
Override to perform setup that requires access to the instance declaration.
| decl | The instance declaration from the manifest. |