ICF 3.1.1.10
Technical documentation of ICF Libraries
CComponentBase.h File Reference
Include dependency graph for CComponentBase.h:

Go to the source code of this file.

Classes

class  icomp::CComponentBase
 Base class for component implementation. More...
 

Namespaces

namespace  icomp
 Package with interfaces and class used for components concept.
 

Macros

#define I_TFACT(interfaceType, member)
 
#define I_ASSIGN_BASE(member, id, description, isObligatory)
 Used to assign value for single parameter (attribute, reference or factory).
 
#define I_ASSIGN_MULTI_BASE(member, id, description, isObligatory, defaultValue)
 Used to assign value for multiply parameters (attributes, references or factories).
 
#define I_TASSIGN_BASE(member, id, description, isObligatory)
 Used to assign value for single parameter with template type (attribute, reference or factory).
 
#define I_TASSIGN_MULTI_BASE(member, id, description, isObligatory, defaultValue)
 Used to assign value for multiply parameters with template type (attributes, references or factories).
 

Functions

template<class Dest >
Dest * CompCastPtr (istd::IPolymorphic *objectPtr)
 Cast to specified interface trying to use component interface query.
 
template<class Dest >
const Dest * CompCastPtr (const istd::IPolymorphic *objectPtr)
 Cast to specified interface trying to use component interface query.
 

Macro Definition Documentation

◆ I_ASSIGN_BASE

#define I_ASSIGN_BASE ( member,
id,
description,
isObligatory )
Value:
static icomp::TAttributeStaticInfo<member##_AttrType> member##_Info(staticInfo, id, description, &member##_Default, isObligatory? member##_AttrType::DAF_OBLIGATORY: member##_AttrType::DAF_OPTIONAL, istd::CClassInfo::GetInfo<typename member##_Type::InterfaceType>());\
if (componentPtr != nullptr){\
componentPtr->member.Init(componentPtr, member##_Info);\
}
static CClassInfo GetInfo()
Get class name defined as template parameter.
Definition CClassInfo.h:212

Used to assign value for single parameter (attribute, reference or factory).

Definition at line 317 of file CComponentBase.h.

◆ I_ASSIGN_MULTI_BASE

#define I_ASSIGN_MULTI_BASE ( member,
id,
description,
isObligatory,
defaultValue )
Value:
static member##_AttrType member##_Default(int(sizeof(member##_DefaultElements) / sizeof(member##_AttrType::ValueType)), member##_DefaultElements);\
I_ASSIGN_BASE(member, id, description, isObligatory)

Used to assign value for multiply parameters (attributes, references or factories).

Definition at line 334 of file CComponentBase.h.

◆ I_TASSIGN_BASE

#define I_TASSIGN_BASE ( member,
id,
description,
isObligatory )
Value:
static icomp::TAttributeStaticInfo<member##_AttrType> member##_Info(staticInfo, id, description, &member##_Default, isObligatory? member##_AttrType::DAF_OBLIGATORY: member##_AttrType::DAF_OPTIONAL, istd::CClassInfo::GetInfo<typename member##_Type::InterfaceType>());\
if (componentPtr != nullptr){\
componentPtr->member.Init(componentPtr, member##_Info);\
}

Used to assign value for single parameter with template type (attribute, reference or factory).

Definition at line 386 of file CComponentBase.h.

◆ I_TASSIGN_MULTI_BASE

#define I_TASSIGN_MULTI_BASE ( member,
id,
description,
isObligatory,
defaultValue )
Value:
static member##_AttrType member##_Default(int(sizeof(member##_DefaultElements) / sizeof(member##_AttrType::ValueType)), member##_DefaultElements);\
I_TASSIGN_BASE(member, id, description, isObligatory)

Used to assign value for multiply parameters with template type (attributes, references or factories).

Definition at line 402 of file CComponentBase.h.

◆ I_TFACT

#define I_TFACT ( interfaceType,
member )
Value:
typedef icomp::TFactoryMember<interfaceType> member##_Type;\
typedef typename icomp::TFactoryMember<interfaceType>::AttributeType member##_AttrType;\
Special attribute used to store referenced component ID.
Factory of components used as component member.

Definition at line 300 of file CComponentBase.h.

Function Documentation

◆ CompCastPtr() [1/2]

template<class Dest >
const Dest * CompCastPtr ( const istd::IPolymorphic * objectPtr)
inline

Cast to specified interface trying to use component interface query.

It extends standard dynamic_cast functionality when you use composed components. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 481 of file CComponentBase.h.

◆ CompCastPtr() [2/2]

template<class Dest >
Dest * CompCastPtr ( istd::IPolymorphic * objectPtr)
inline

© Witold Gantzke and Kirill Lepskiy