Close menu
Start
Download
Getting Started
License
References
Jam Build Tool
Class Index
Namespaces
Modules
Pt
›
Documentation
Documentation
›
Get Platinum
≡
Class Index
Namespaces
Modules
include
Pt
Cosmo
Main.h
1
26
27
#ifndef COSMO_MAIN_COMPONENT_H
28
#define COSMO_MAIN_COMPONENT_H
29
30
#include <Pt/Cosmo/Api.h>
31
#include <Pt/Cosmo/Component.h>
32
#include <Pt/Cosmo/ComponentPlugin.h>
33
34
namespace
Pt
{
35
36
namespace
Cosmo
{
37
38
class
MainImpl;
39
class
MainPlugin;
40
class
ComponentManager
;
41
50
class
PT_COSMO_API
Main
:
public
Component
51
{
52
public
:
53
template
<
typename
I>
54
I* getInterface();
55
56
public
:
63
Main
(
int
& argc,
char
** argv,
ComponentManager
& cm);
64
67
virtual
~Main
();
68
73
void
run
();
74
75
MainImpl& impl();
76
77
private
:
78
MainPlugin* _mainPlugin;
79
MainImpl* _impl;
80
};
81
84
class
MainFactory
85
{
86
public
:
89
explicit
MainFactory(
Main
& main)
90
: _main(&main)
91
{}
92
93
Component* create()
94
{
return
_main; }
95
96
void
destroy(Component* instance)
97
{ }
98
99
private
:
100
Main* _main;
101
};
102
105
class
MainPlugin :
public
ComponentPlugin
<Main, MainFactory>
106
{
107
public
:
108
static
const
char
* FeatureId()
109
{
return
"Cosmo.Main"
; }
110
111
static
const
char
* ClassId()
112
{
return
"Cosmo.Main"
; }
113
114
static
const
char
* Info()
115
{
return
"Cosmo.Default"
; }
116
117
public
:
118
MainPlugin(Main& m);
119
};
120
121
}
// namespace Cosmo
122
123
}
// namespace Pt
124
125
#endif
// include guard
Pt::Cosmo::ComponentManager
Default component manager.
Definition
ComponentManager.h:53
Pt::Cosmo::ComponentPlugin
Default component plugin.
Definition
ComponentPlugin.h:105
Pt::Cosmo::Component::Component
Component()
Constructor.
Pt::Cosmo::Main
Main component.
Definition
Main.h:51
Pt::Cosmo::Main::run
void run()
Launches the application.
Pt::Cosmo::Main::Main
Main(int &argc, char **argv, ComponentManager &cm)
Constructs the main component.
Pt::Cosmo::Main::~Main
virtual ~Main()
Destructor.
Pt::Cosmo
Cosmo Component Model.
Definition
Api.h:53
Pt
Core module.
Definition
Allocator.h:33