This class is the front interface of the component factories of Server, The components are IlsMvComponent
and IlsMvComponentItf
instances, created by the factories IlsMvEndPointFactory, IlsSrvEndPointFactory
and IlsMvComponentFactory
.
More...
#include <ilserver/mvendpt.h>
Public Member Functions | |
IlsMvEndPointFactory () | |
Constructor. More... | |
virtual | ~IlsMvEndPointFactory () |
Destructor. More... | |
virtual IlsMvEndPoint * | newComponent () |
Called by the NewComponent() static function to create a new instance of an IlsMvComponent class or subclass. More... | |
virtual IlsMvEndPoint * | newComponentItf () |
Called by the NewComponentItf() static function to create a new instance of an IlsMvComponentItf class or subclass. More... | |
Static Public Member Functions | |
static IlsMvEndPointFactory & | GetSingleton () |
Returns a reference to the component factory. More... | |
static IlsMvEndPointFactory * | GetSingletonPtr () |
Returns a pointer to the component factory. More... | |
static IlsMvEndPoint * | NewComponent () |
Called by Server to create a new instance of the IlsMvComponent class. More... | |
static IlsMvEndPoint * | NewComponentItf () |
Called by Server to create a new instance of the IlsMvComponentItf class. More... | |
static IlsMvEndPointFactory * | SetSingleton (IlsMvEndPointFactory *componentFactory) |
Declares the object pointed by componentFactory as the component factory singleton. More... | |
This class is the front interface of the component factories of Server, The components are IlsMvComponent
and IlsMvComponentItf
instances, created by the factories IlsMvEndPointFactory, IlsSrvEndPointFactory
and IlsMvComponentFactory
.
Library: mvserver
and mvcomp
Front interface means that IlsMvProcess
calls the static functions NewComponent()
and NewComponentItf
of this class to get component instances. Then IlsMvEndPointFactory::NewComponent()
calls another factory class, IlsMvComponentFactory
, to get IlsMvComponent
instances.
In addition of being the front interface, IlsMvEndPointFactory is a factory too, newComponent()
and newComponentItf
being the instance providers. Note that this is not the default factory of Server, the default is the subclass IlsSrvEndPointFactory
, which is set with SetSingleton()
in the constructor of IlsMvServer.
See IlsMvComponentFactory
and IlsMvComponent
to have more details about IlsMvComponents. See IlsMvComponentItf
to have more details about IlsMvComponentItfs.
By subclassing IlsMvEndPointFactory
and overriding the newInstance()
and newComponentItf()
functions, you can create your own subtypes of IlsMvComponent
and IlsMvComponentItf
.
IlsMvEndPointFactory::IlsMvEndPointFactory | ( | ) |
Constructor.
The construction of an IlsMvEndPointFactory object is triggered either by the function GetSingleton()
or by the construction of a IlsMvComponentItf.
|
virtual |
Destructor.
The destruction of the singleton is automatically performed at process exit.
|
static |
Returns a reference to the component factory.
If no factory has been declared yet, an instance of IlsMvEndPointFactory
is automatically created. It is declared as the class singleton using the SetSingleton()
member function and returned as the result of this function.
|
static |
Returns a pointer to the component factory.
If no factory has been declared yet, returns 0.
|
virtual |
Called by the NewComponent()
static function to create a new instance of an IlsMvComponent
class or subclass.
This implementation calls another factory class, IlsMvComponentFactory
, to get IlsMvComponent
instances. You must override it if you want Server to create instances of a specific derived class.
GetSingleton()
, NewComponent()
.
|
static |
Called by Server to create a new instance of the IlsMvComponent
class.
It calls the newComponent()
function on the class singleton (see GetSingleton()
).
|
virtual |
Called by the NewComponentItf()
static function to create a new instance of an IlsMvComponentItf
class or subclass.
This implementation returns 0. You must override it if you want Server to create instances of a specific derived class.
GetSingleton()
, NewComponentItf()
.Reimplemented in IlsSrvEndPointFactory.
|
static |
Called by Server to create a new instance of the IlsMvComponentItf
class.
It calls the newComponentItf()
function on the class singleton (see GetSingleton()
).
|
static |
Declares the object pointed by componentFactory as the component factory singleton.
If componentFactory is null, the component factory singleton no longer exists. This function returns the address of the previous current component factory or, by default, the null pointer. Server doesn't delete the previous factory, it must be stored or deleted.
componentFactory | Pointer to the new singleton |