PixelLightAPI  .
Protected Member Functions | Protected Attributes
PLCore::ClassReal Class Reference

Real 'Class' implementation. More...

#include <ClassReal.h>

Inheritance diagram for PLCore::ClassReal:
Inheritance graph
[legend]

List of all members.

Protected Member Functions

virtual PLCORE_API bool IsDummy () const override
 Return whether or not the class implementation is a dummy used for delayed shared library loading.
virtual PLCORE_API void InitClass () const override
 Initialize class and class members.
virtual PLCORE_API void DeInitClass () const override
 De-Initialize class and class members.
virtual PLCORE_API const List
< VarDesc * > & 
GetAttributes () const override
 Get attributes.
virtual PLCORE_API const VarDescGetAttribute (const String &sName) const override
 Get attribute.
virtual PLCORE_API const List
< FuncDesc * > & 
GetMethods () const override
 Get methods.
virtual PLCORE_API const FuncDescGetMethod (const String &sName) const override
 Get method.
virtual PLCORE_API const List
< EventDesc * > & 
GetSignals () const override
 Get signals.
virtual PLCORE_API const
EventDesc
GetSignal (const String &sName) const override
 Get signal.
virtual PLCORE_API const List
< EventHandlerDesc * > & 
GetSlots () const override
 Get slot.
virtual PLCORE_API const
EventHandlerDesc
GetSlot (const String &sName) const override
 Get slot.
virtual PLCORE_API bool HasConstructor () const override
 Check if class has any constructors.
virtual PLCORE_API bool HasDefaultConstructor () const override
 Check if class has a default constructor.
virtual PLCORE_API const List
< ConstructorDesc * > & 
GetConstructors () const override
 Get constructors.
virtual PLCORE_API const
ConstructorDesc
GetConstructor (const String &sName) const override
 Get constructor.
virtual PLCORE_API ObjectCreate () const override
 Create object by using the default constructor.
virtual PLCORE_API ObjectCreate (const DynParams &cParams) const override
 Create object by using typed constructor parameters in order to identity the constructor automatically.
virtual PLCORE_API ObjectCreate (const String &sName, const DynParams &cParams) const override
 Create object by using a given constructor name and typed constructor parameters.
virtual PLCORE_API ObjectCreate (const String &sName, const String &sParams) const override
 Create object by using a given constructor name and typeless constructor parameters.
PLCORE_API ClassReal (uint32 nModuleID, const String &sName, const String &sDescription, const String &sNamespace, const String &sBaseClass)
 Constructor.
virtual PLCORE_API ~ClassReal ()
 Destructor.
PLCORE_API void AddMember (MemberDesc *pMemberDesc)
 Add member.

Protected Attributes

List< MemberDesc * > m_lstOwnMembers
HashMap< String, MemberDesc * > m_mapMembers
List< VarDesc * > m_lstAttributes
List< FuncDesc * > m_lstMethods
List< EventDesc * > m_lstSignals
List< EventHandlerDesc * > m_lstSlots
List< ConstructorDesc * > m_lstConstructors

Detailed Description

Real 'Class' implementation.

Note:
  • The class instance is created and destroyed automatically by the RTTI system (see "pl_class"-macro)

Constructor & Destructor Documentation

PLCORE_API PLCore::ClassReal::ClassReal ( uint32  nModuleID,
const String sName,
const String sDescription,
const String sNamespace,
const String sBaseClass 
) [protected]

Constructor.

Parameters:
[in]nModuleIDID of owner module
[in]sNameName
[in]sDescriptionDescription
[in]sNamespaceNamespace
[in]sBaseClassBase class
virtual PLCORE_API PLCore::ClassReal::~ClassReal ( ) [protected, virtual]

Destructor.


Member Function Documentation

virtual PLCORE_API bool PLCore::ClassReal::IsDummy ( ) const [override, protected, virtual]

Return whether or not the class implementation is a dummy used for delayed shared library loading.

Returns:
'true' if the class implementation is a dummy used for delayed shared library loading, else 'false'

Implements PLCore::ClassImpl.

virtual PLCORE_API void PLCore::ClassReal::InitClass ( ) const [override, protected, virtual]

Initialize class and class members.

Remarks:
This function is called automatically when it is necessary, e.g. the first time any members are being accessed. It will search for the base class of the class and initialize all members. If later a class is changed (e.g. a new member is registered at one of the base classes), that class and all derived classes will destroy their information and must be initialized again.

Implements PLCore::ClassImpl.

virtual PLCORE_API void PLCore::ClassReal::DeInitClass ( ) const [override, protected, virtual]

De-Initialize class and class members.

Remarks:
This function destroys all data about the class and it's members. See InitClass() for more information about why this is necessary and when.

Implements PLCore::ClassImpl.

virtual PLCORE_API const List<VarDesc*>& PLCore::ClassReal::GetAttributes ( ) const [override, protected, virtual]

Get attributes.

Returns:
List of attribute descriptors

Implements PLCore::ClassImpl.

virtual PLCORE_API const VarDesc* PLCore::ClassReal::GetAttribute ( const String sName) const [override, protected, virtual]

Get attribute.

Parameters:
[in]sNameAttribute name
Returns:
Attribute descriptor (can be a null pointer, if no member with that name could be found)

Implements PLCore::ClassImpl.

virtual PLCORE_API const List<FuncDesc*>& PLCore::ClassReal::GetMethods ( ) const [override, protected, virtual]

Get methods.

Returns:
List of method descriptors

Implements PLCore::ClassImpl.

virtual PLCORE_API const FuncDesc* PLCore::ClassReal::GetMethod ( const String sName) const [override, protected, virtual]

Get method.

Parameters:
[in]sNameMethod name
Returns:
Method descriptor (can be a null pointer, if no member with that name could be found)

Implements PLCore::ClassImpl.

virtual PLCORE_API const List<EventDesc*>& PLCore::ClassReal::GetSignals ( ) const [override, protected, virtual]

Get signals.

Returns:
List of signal descriptors

Implements PLCore::ClassImpl.

virtual PLCORE_API const EventDesc* PLCore::ClassReal::GetSignal ( const String sName) const [override, protected, virtual]

Get signal.

Parameters:
[in]sNameSignal name
Returns:
Signal descriptor (can be a null pointer, if no member with that name could be found)

Implements PLCore::ClassImpl.

virtual PLCORE_API const List<EventHandlerDesc*>& PLCore::ClassReal::GetSlots ( ) const [override, protected, virtual]

Get slot.

Returns:
List of slot descriptors

Implements PLCore::ClassImpl.

virtual PLCORE_API const EventHandlerDesc* PLCore::ClassReal::GetSlot ( const String sName) const [override, protected, virtual]

Get slot.

Parameters:
[in]sNameSlot name
Returns:
Slot descriptor (can be a null pointer, if no member with that name could be found)

Implements PLCore::ClassImpl.

virtual PLCORE_API bool PLCore::ClassReal::HasConstructor ( ) const [override, protected, virtual]

Check if class has any constructors.

Returns:
'true' if class has at least one constructor, else 'false'

Implements PLCore::ClassImpl.

virtual PLCORE_API bool PLCore::ClassReal::HasDefaultConstructor ( ) const [override, protected, virtual]

Check if class has a default constructor.

Returns:
'true' if class has a default constructor, else 'false'

Implements PLCore::ClassImpl.

virtual PLCORE_API const List<ConstructorDesc*>& PLCore::ClassReal::GetConstructors ( ) const [override, protected, virtual]

Get constructors.

Returns:
List of constructor descriptors

Implements PLCore::ClassImpl.

virtual PLCORE_API const ConstructorDesc* PLCore::ClassReal::GetConstructor ( const String sName) const [override, protected, virtual]

Get constructor.

Parameters:
[in]sNameConstructor name
Returns:
Constructor descriptor (can be a null pointer, if no member with that name could be found)

Implements PLCore::ClassImpl.

virtual PLCORE_API Object* PLCore::ClassReal::Create ( ) const [override, protected, virtual]

Create object by using the default constructor.

Returns:
Pointer to created object (can be a null pointer)
Remarks:
This function will call the default constructor of the class. If the class has no default constructor, the function will fail and return a null pointer.

Implements PLCore::ClassImpl.

virtual PLCORE_API Object* PLCore::ClassReal::Create ( const DynParams cParams) const [override, protected, virtual]

Create object by using typed constructor parameters in order to identity the constructor automatically.

Parameters:
[in]cParamsConstructor parameters
Returns:
Pointer to created object (can be a null pointer)
Remarks:
This function will search for a constructor that matches the signature of the given parameters. If no such constructor can be found, the function will fail and return a null pointer.

Implements PLCore::ClassImpl.

virtual PLCORE_API Object* PLCore::ClassReal::Create ( const String sName,
const DynParams cParams 
) const [override, protected, virtual]

Create object by using a given constructor name and typed constructor parameters.

Parameters:
[in]sNameConstructor name
[in]cParamsConstructor parameters
Returns:
Pointer to created object (can be a null pointer)
Remarks:
This function will search for a constructor with the specified name. If no such constructor can be found, or the given parameters do not match the signature of the constructor, the function will fail and return a null pointer.

Implements PLCore::ClassImpl.

virtual PLCORE_API Object* PLCore::ClassReal::Create ( const String sName,
const String sParams 
) const [override, protected, virtual]

Create object by using a given constructor name and typeless constructor parameters.

Parameters:
[in]sNameConstructor name
[in]sParamsConstructor parameters
Returns:
Pointer to created object (can be a null pointer, destroy the returned instance when you no longer need it)
Remarks:
This function will search for a constructor with the specified name. If no such constructor can be found, the function will fail and return a null pointer.

Implements PLCore::ClassImpl.

PLCORE_API void PLCore::ClassReal::AddMember ( MemberDesc pMemberDesc) [protected]

Add member.

Parameters:
[in]pMemberDescMember descriptor

Member Data Documentation

List of members

Hash map of names -> members

List of attributes

List of methods

List of signals

List of slots

List of constructors


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:03
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported