#include <objectbase.h>
ComponentDescriptor describes a component implementation (created by MAXON_COMPONENT and MAXON_COMPONENT_ONLY_REGISTER) at runtime. It is an EntityDefinition object, the component descriptor can be published as an object via MAXON_DECLARATION.
Public Member Functions | |
ComponentDescriptor () | |
~ComponentDescriptor () | |
template<typename C , typename REG > | |
ComponentDescriptor (C *ctype, LiteralId &&cid, TranslationUnit *unit, const Char *file, EntityBase::FLAGS flags, REG *registry) | |
const Id & | GetId () const |
Result< void > | Initialize (const Id &cause) const |
String | ToString (const FormatStatement *fs=nullptr) const |
const EntityDefinition & | GetDefinition () const |
const ComponentDescriptor * | GetClassProxy () const |
const Block< const InterfaceReference *const > & | GetInterfaces () const |
EntityBase::FLAGS | GetFlags () const |
Int | GetSize () const |
Static Public Member Functions | |
static MAXON_ATTRIBUTE_FORCE_INLINE const ComponentDescriptor & | NullValue () |
Public Attributes | |
Result< void >(*)(const DataSerializeInterface &) | GetDescribeIO () const |
Private Member Functions | |
ComponentDescriptor (Bool dummy, const ComponentDescriptor &base) | |
ComponentDescriptor (LiteralId &&cid, TranslationUnit *unit, const Char *file, EntityBase::FLAGS flags) | |
template<typename C > | |
void | Construct () |
Private Attributes | |
EntityDefinition | _super |
void(* | _construct )(void *component) |
DestructorPointer | _destruct |
Result< void >(* | _init )(void *component) |
void(* | _free )(void *component) |
Result< void >(* | _copyFrom )(void *destComp, const void *srcObject) |
Bool(* | _constructMTable )(ClassInfo *info, Int offset, void *supervtable) |
Result< void >(* | _initImplementation )() |
void(* | _freeImplementation )() |
Result< void >(* | _describeIO )(const DataSerializeInterface &) |
Block< const InterfaceReference *const > | _interfaces |
Int | _size |
Int | _alignment |
Int | _superMTableSize |
UInt | _hashCode |
Int | _selfPtrOffset |
Int | _simpleMTableSize |
Id | _registry |
const ComponentDescriptor * | _classProxy |
void * | _implementedMethods |
const PrivateSuperCallBase * | _supercalls |
Friends | |
class | ObjectModel |
class | ObjectInterface |
class | PrivateSuperCallBase |
class | ClassInfo |
class | ClassImpl |
class | VirtualInterfaceInfo |
struct | VirtualInterfaceVersion |
~ComponentDescriptor | ( | ) |
ComponentDescriptor | ( | C * | ctype, |
LiteralId && | cid, | ||
TranslationUnit * | unit, | ||
const Char * | file, | ||
EntityBase::FLAGS | flags, | ||
REG * | registry | ||
) |
Constructs the ComponentDescriptor object and adds it to the definition list of the current translation unit. Class C is used as implementation class of the component.
[in] | ctype | Dummy parameter, this is only needed to determine template parameter C. |
[in] | cid | The unique component identifier. |
[in] | unit | The translation unit containing the component implementation. |
[in] | file | Source file name. |
[in] | flags | PROXY may be set here. |
[in] | registry | Dummy parameter to pass the registry. |
C | Implementation class of the component. |
|
private |
|
private |
const Id& GetId | ( | ) | const |
Returns the component identifier of this descriptor.
Initializes the component descriptor. This is invoked by the object system after all other entity objects on which the component depends have been initialized. If the descriptor has been initialized already, or if such a previous attempt failed, no further initialization is done. All references to the descriptor object (given by MAXON_DECLARATION) will be initialized, too.
[in] | cause | Identifier of another entity which caused the initialization of this descriptor. This is only for informative purpose. |
|
static |
String ToString | ( | const FormatStatement * | fs = nullptr | ) | const |
const EntityDefinition& GetDefinition | ( | ) | const |
const ComponentDescriptor* GetClassProxy | ( | ) | const |
const Block<const InterfaceReference* const>& GetInterfaces | ( | ) | const |
EntityBase::FLAGS GetFlags | ( | ) | const |
Int GetSize | ( | ) | const |
|
private |
Used by the constructors to initialize function pointers and other implementation-specific values from the component implementation class C.
C | Implementation class of the component. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Result<void>(*)(const DataSerializeInterface&) GetDescribeIO() const |
|
private |
Base definition object.
|
private |
Constructor of component.
|
private |
Destructor of component.
|
private |
Pointer for InitComponent function.
|
private |
Pointer for FreeComponent function.
|
private |
Pointer for CopyFrom function.
Pointer for ConstructMTable function of component implementation class.
|
private |
Pointer for InitImplementation function of component implementation class.
|
private |
Pointer for FreeImplementation function of component implementation class.
|
private |
This function is used to describe the component for I/O operations.
|
private |
The list of implemented interfaces (excluding base interfaces).
|
private |
Size of component object data.
|
private |
Alignment of component object data.
|
private |
Size of super-vtable of component.
|
private |
Hash code of component descriptor. This will be less than ClassInfo::HASH_TABLE_SIZE.
|
private |
Offset of the self pointer within the component.
|
private |
Size of the simple method table if this component implements a simple virtual interface, 0 otherwise.
|
private |
For a proxy component, this points to the corresponding class proxy component.
|
private |
Pointer to internal information about the set of implemented methods.
|
mutableprivate |
Singly-linked list of super calls which are needed by this component.