ACF $AcfVersion:0$
Classes | Namespaces | Macros | Functions
CComponentBase.h File Reference
#include <istd/CClassInfo.h>
#include <iattr/TAttribute.h>
#include <iattr/TMultiAttribute.h>
#include <icomp/IComponent.h>
#include <icomp/ICompositeComponent.h>
#include <icomp/IRealComponentStaticInfo.h>
#include <icomp/TInterfaceRegistrator.h>
#include <icomp/TAttributeMember.h>
#include <icomp/TMultiAttributeMember.h>
#include <icomp/TReferenceMember.h>
#include <icomp/TMultiReferenceMember.h>
#include <icomp/TFactoryMember.h>
#include <icomp/TMultiFactoryMember.h>
#include <icomp/TAttributeStaticInfo.h>
#include <icomp/TComponentStaticInfo.h>
#include <icomp/TSubelementStaticInfo.h>
#include <icomp/CBaseComponentStaticInfo.h>
#include <icomp/CRelatedInfoRegistrator.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_REGISTER_SUBELEMENT_INTERFACE_T(ElementName, InterfaceType, extractorFunction)
 Register interface extractor for some subelement with template extractor function.
 
#define I_TEXTATTR(member)
 Declare translatable text attribute member.
 
#define I_MULTITEXTATTR(member)
 Declare translatable multiple text attribute member.
 
#define I_TFACT(interfaceType, member)
 Declare single generic factory of components.
 
#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.
 
template<class Dest >
Dest * QueryInterface (istd::IPolymorphic *objectPtr, const QByteArray &componentId=QByteArray())
 Queries an object for a specified interface.
 

Macro Definition Documentation

◆ 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 356 of file CComponentBase.h.

◆ I_REGISTER_SUBELEMENT_INTERFACE_T

#define I_REGISTER_SUBELEMENT_INTERFACE_T (   ElementName,
  InterfaceType,
  extractorFunction 
)
Value:
{\
subelementInfo_##ElementName,\
extractorFunction<InterfaceType>);\
Q_UNUSED(staticRegistrator);\
}

Register interface extractor for some subelement with template extractor function.

Parameters
ElementNamename of subelement.
InterfaceTypetype of registered interface.
extractorFunctionfunction returning pointer to casted type (must be 'InterfaceType* Foo(MyComponent& component)')".

Definition at line 186 of file CComponentBase.h.