Public Types | Public Member Functions | List of all members
icomp::TSimComponentsFactory< Base > Class Template Reference

Simulation wrapper of component. More...

#include <TSimComponentsFactory.h>

Inheritance diagram for icomp::TSimComponentsFactory< Base >:
icomp::TSimComponentWrap< Base > istd::TIFactory< icomp::IComponent > icomp::TComponentWrap< Base > icomp::CSimComponentContextBase icomp::ICompositeComponent istd::IFactoryInfo icomp::IComponentContext istd::CIdManipBase icomp::IComponent istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

Public Types

typedef TSimComponentWrap< Base > BaseClass
 
- Public Types inherited from icomp::TSimComponentWrap< Base >
typedef TComponentWrap< Base > BaseClass
 
typedef CSimComponentContextBase BaseClass2
 
- Public Types inherited from icomp::TComponentWrap< Base >
typedef Base BaseClass
 
- Public Types inherited from icomp::CSimComponentContextBase
typedef istd::TIFactory
< icomp::IComponent
ComponentsFactory
 
- Public Types inherited from istd::TIFactory< icomp::IComponent >
typedef icomp::IComponent InterfaceType
 
- Public Types inherited from istd::IFactoryInfo
typedef QSet< QByteArray > KeyList
 

Public Member Functions

 TSimComponentsFactory ()
 
virtual istd::IFactoryInfo::KeyList GetFactoryKeys () const
 Returns all posible keys for this factory. More...
 
virtual icomp::IComponentCreateInstance (const QByteArray &keyId="") const
 Create an instance of the object, mapped to the keyId keyId. More...
 
virtual IComponentCreateSubcomponent (const QByteArray &componentId) const
 Create instance of subcomponent using its ID. More...
 
- Public Member Functions inherited from icomp::TSimComponentWrap< Base >
 TSimComponentWrap ()
 
void InitComponent ()
 Initialilze component after setting all its attributes and references. More...
 
virtual const QByteArray & GetContextId () const
 Get ID of this component in the context tree. More...
 
virtual IComponentGetSubcomponent (const QByteArray &componentId) const
 Get access to subcomponent using its ID. More...
 
virtual const IComponentContextGetSubcomponentContext (const QByteArray &componentId) const
 Get access to context of subcomponent using its ID. More...
 
virtual void OnSubcomponentDeleted (const IComponent *subcomponentPtr)
 Called if subcomponent is removed from memory. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
- Public Member Functions inherited from icomp::TComponentWrap< Base >
 TComponentWrap ()
 
virtual ~TComponentWrap ()
 
virtual void SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 
- Public Member Functions inherited from icomp::CSimComponentContextBase
 CSimComponentContextBase (const IComponentStaticInfo *infoPtr)
 
bool SetAttr (const QByteArray &attributeId, const iser::IObject *attributePtr)
 Set named attribute. More...
 
bool SetRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
 Set named reference to some component. More...
 
bool InsertMultiRef (const QByteArray &referenceId, IComponent *componentPtr, const QByteArray &subelementId="")
 Set named reference to some component. More...
 
bool SetFactory (const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
 Set factory of component instance. More...
 
bool InsertMultiFactory (const QByteArray &factoryId, const ComponentsFactory *factoryPtr)
 Insert new factory instance into multi-factory attribute. More...
 
bool SetBoolAttr (const QByteArray &attributeId, bool value)
 Set instance of bool attribute. More...
 
bool SetIntAttr (const QByteArray &attributeId, int value)
 Set instance of int attribute. More...
 
bool SetDoubleAttr (const QByteArray &attributeId, double value)
 Set instance of double attribute. More...
 
bool SetStringAttr (const QByteArray &attributeId, const QString &value)
 Set instance of QString attribute. More...
 
bool SetIdAttr (const QByteArray &attributeId, const QByteArray &value)
 Set instance of QByteArray attribute. More...
 
template<class Attribute >
bool InsertMultiAttr (const QByteArray &attributeId, const Attribute &attribute)
 Insert new attribute to multi attributes. More...
 
bool InsertMultiAttr (const QByteArray &attributeId, const QString &attribute)
 
virtual const IRegistryElementGetRegistryElement () const
 Get access to component registry element object. More...
 
virtual const
IComponentStaticInfo
GetStaticInfo () const
 Get component static info associated with this context. More...
 
virtual const IComponentContextGetParentContext () const
 Get access to parent component context. More...
 
virtual const iser::IObjectGetAttribute (const QByteArray &attributeId, int *definitionLevelPtr=NULL) const
 Get attribute using its ID. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from icomp::IComponent
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const =0
 Get access to component context describing all application-specified component information loaded from components registry. More...
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)=0
 Set component context of this component. More...
 

Additional Inherited Members

- Protected Types inherited from icomp::CSimComponentContextBase
typedef QMap< QByteArray,
IComponent * > 
ComponentsMap
 
typedef QMap< QByteArray,
const ComponentsFactory * > 
FactoriesMap
 
- Protected Member Functions inherited from icomp::CSimComponentContextBase
template<class AttrType >
bool IsAttributeTypeCorrect (const QByteArray &attributeId)
 Check if attribute type is corrected. More...
 
- Static Protected Member Functions inherited from istd::CIdManipBase
static bool SplitId (const QByteArray &complexId, QByteArray &baseId, QByteArray &subId)
 Split component ID into separated ID's. More...
 
static QByteArray JoinId (const QByteArray &baseId, const QByteArray &subId)
 Join base component ID and sub ID into composed component ID. More...
 
- Protected Attributes inherited from icomp::CSimComponentContextBase
ComponentsMap m_componentsMap
 
FactoriesMap m_factoriesMap
 

Detailed Description

template<class Base>
class icomp::TSimComponentsFactory< Base >

Simulation wrapper of component.

It allows to use components directly from static linked libraries, without component framework.

Definition at line 25 of file TSimComponentsFactory.h.

Member Typedef Documentation

template<class Base >
typedef TSimComponentWrap<Base> icomp::TSimComponentsFactory< Base >::BaseClass

Definition at line 28 of file TSimComponentsFactory.h.

Constructor & Destructor Documentation

template<class Base >
icomp::TSimComponentsFactory< Base >::TSimComponentsFactory ( )

Definition at line 49 of file TSimComponentsFactory.h.

Member Function Documentation

template<class Base >
icomp::IComponent * icomp::TSimComponentsFactory< Base >::CreateInstance ( const QByteArray &  keyId = "") const
virtual

Create an instance of the object, mapped to the keyId keyId.

Parameters
keyId
Returns
pointer to created object or NULL if it was not possible to create it or keyId does not exist.

Implements istd::TIFactory< icomp::IComponent >.

Definition at line 67 of file TSimComponentsFactory.h.

References NULL, and icomp::IComponent::SetComponentContext().

template<class Base >
IComponent * icomp::TSimComponentsFactory< Base >::CreateSubcomponent ( const QByteArray &  componentId) const
virtual

Create instance of subcomponent using its ID.

Reimplemented from icomp::TSimComponentWrap< Base >.

Definition at line 84 of file TSimComponentsFactory.h.

References NULL.

template<class Base >
istd::IFactoryInfo::KeyList icomp::TSimComponentsFactory< Base >::GetFactoryKeys ( ) const
virtual

Returns all posible keys for this factory.

Implements istd::IFactoryInfo.

Definition at line 58 of file TSimComponentsFactory.h.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy