PixelLightAPI
.
|
#include <Object.h>
Public Member Functions | |
PLCORE_API | Object () |
Constructor. | |
virtual PLCORE_API | ~Object () |
Destructor. | |
PLCORE_API bool | IsInstanceOfByReference (const Class &cClass) const |
Check if object is instance of a given class by using a given class reference. | |
PLCORE_API bool | IsInstanceOf (const String &sClass) const |
Check if object is instance of a given class. | |
PLCORE_API const List< DynVar * > | GetAttributes () const |
Get attributes. | |
PLCORE_API DynVar * | GetAttribute (const String &sName) const |
Get attribute. | |
PLCORE_API void | GetMethods (List< DynFuncPtr > &lstMethods) |
Get all callable methods. | |
PLCORE_API DynFuncPtr | GetMethod (const String &sName) |
Get callable method by using a given method name. | |
PLCORE_API const List< DynEvent * > | GetSignals () const |
Get a list of all signals. | |
PLCORE_API DynEvent * | GetSignal (const String &sName) const |
Get signal by using a given signal name. | |
PLCORE_API const List < DynEventHandler * > | GetSlots () const |
Get a list of all slots. | |
PLCORE_API DynEventHandler * | GetSlot (const String &sName) const |
Get slot by using a given slot name. | |
PLCORE_API void | SetAttribute (const String &sName, const String &sValue) |
Set attribute value by using a given string value. | |
PLCORE_API void | SetAttribute (const String &sName, const DynVar &cVar) |
Set attribute value by using a given dynamic variable reference. | |
PLCORE_API void | SetAttribute (const String &sName, const DynVar *pVar) |
Set attribute value by using a given dynamic variable pointer. | |
PLCORE_API void | SetAttributeDefault (const String &sName) |
Set attribute to it's default value. | |
PLCORE_API void | CallMethod (const String &sName, DynParams &cParams) |
Call method with given dynamic parameters. | |
PLCORE_API void | CallMethod (const String &sName, const DynParams &cParams) |
Call method with given constant dynamic parameters. | |
PLCORE_API void | CallMethod (const String &sName, const String &sParams) |
Call method with parameters given as string. | |
PLCORE_API void | CallMethod (const String &sName, const XmlElement &cElement) |
Call method with parameters given as XML element. | |
PLCORE_API String | GetValues (EDefaultValue nDefaultValue=NoDefault) const |
Get attribute values as a string. | |
PLCORE_API void | SetValues (const String &sVars) |
Set multiple attribute values as a string at once. | |
PLCORE_API void | GetValuesXml (XmlElement &cElement, EDefaultValue nDefaultValue=NoDefault) const |
Get attribute values as XML. | |
PLCORE_API void | SetValuesXml (const XmlElement &cElement) |
Set attribute values from XML. | |
PLCORE_API void | SetDefaultValues () |
Set all attributes to default. | |
virtual PLCORE_API String | ToString () const |
Get object as string. | |
virtual PLCORE_API void | FromString (const String &sString) |
Set object from string. | |
virtual PLCORE_API XmlElement | ToXml () const |
Get object as XML. | |
virtual PLCORE_API void | FromXml (const XmlElement &cElement) |
Set object from XML. |
Object base class.
PLCORE_API PLCore::Object::Object | ( | ) |
virtual PLCORE_API PLCore::Object::~Object | ( | ) | [virtual] |
Destructor.
PLCORE_API bool PLCore::Object::IsInstanceOfByReference | ( | const Class & | cClass | ) | const |
Check if object is instance of a given class by using a given class reference.
[in] | cClass | Class |
PLCORE_API bool PLCore::Object::IsInstanceOf | ( | const String & | sClass | ) | const |
Check if object is instance of a given class.
[in] | sClass | Class name (with namespace) |
PLCORE_API const List<DynVar*> PLCore::Object::GetAttributes | ( | ) | const |
Get attributes.
PLCORE_API DynVar* PLCore::Object::GetAttribute | ( | const String & | sName | ) | const |
PLCORE_API void PLCore::Object::GetMethods | ( | List< DynFuncPtr > & | lstMethods | ) |
Get all callable methods.
[out] | lstMethods | Receives the list of callable methods, the given list is not cleared before new entries are added (do not destroy the returned instances) |
PLCORE_API DynFuncPtr PLCore::Object::GetMethod | ( | const String & | sName | ) |
Get callable method by using a given method name.
[in] | sName | Method name |
PLCORE_API const List<DynEvent*> PLCore::Object::GetSignals | ( | ) | const |
Get a list of all signals.
PLCORE_API DynEvent* PLCore::Object::GetSignal | ( | const String & | sName | ) | const |
PLCORE_API const List<DynEventHandler*> PLCore::Object::GetSlots | ( | ) | const |
Get a list of all slots.
PLCORE_API DynEventHandler* PLCore::Object::GetSlot | ( | const String & | sName | ) | const |
PLCORE_API void PLCore::Object::SetAttribute | ( | const String & | sName, |
const String & | sValue | ||
) |
PLCORE_API void PLCore::Object::SetAttribute | ( | const String & | sName, |
const DynVar & | cVar | ||
) |
PLCORE_API void PLCore::Object::SetAttribute | ( | const String & | sName, |
const DynVar * | pVar | ||
) |
Set attribute value by using a given dynamic variable pointer.
[in] | sName | Attribute name |
[in] | pVar | Attribute value as dynamic variable pointer, in case of a null pointer, nothing happens at all |
PLCORE_API void PLCore::Object::SetAttributeDefault | ( | const String & | sName | ) |
Set attribute to it's default value.
[in] | sName | Attribute name |
PLCORE_API void PLCore::Object::CallMethod | ( | const String & | sName, |
DynParams & | cParams | ||
) |
Call method with given dynamic parameters.
[in] | sName | Method name |
[in] | cParams | Dynamic parameters |
PLCORE_API void PLCore::Object::CallMethod | ( | const String & | sName, |
const DynParams & | cParams | ||
) |
Call method with given constant dynamic parameters.
[in] | sName | Method name |
[in] | cParams | Constant dynamic parameters |
PLCORE_API void PLCore::Object::CallMethod | ( | const String & | sName, |
const String & | sParams | ||
) |
Call method with parameters given as string.
[in] | sName | Method name |
[in] | sParams | Parameters as string |
PLCORE_API void PLCore::Object::CallMethod | ( | const String & | sName, |
const XmlElement & | cElement | ||
) |
Call method with parameters given as XML element.
[in] | sName | Method name |
[in] | cElement | Parameters as XML element |
PLCORE_API String PLCore::Object::GetValues | ( | EDefaultValue | nDefaultValue = NoDefault | ) | const |
Get attribute values as a string.
[in] | nDefaultValue | 'WithDefault' to retrieve all attributes, 'NoDefault' to only retrieve attributes that are not set to default |
PLCORE_API void PLCore::Object::SetValues | ( | const String & | sVars | ) |
Set multiple attribute values as a string at once.
[in] | sVars | String containing attributes and values (e.g. "Name='Bob' Position='1 2 3'") |
PLCORE_API void PLCore::Object::GetValuesXml | ( | XmlElement & | cElement, |
EDefaultValue | nDefaultValue = NoDefault |
||
) | const |
Get attribute values as XML.
[out] | cElement | XML element |
[in] | nDefaultValue | 'WithDefault' to retrieve all attributes, 'NoDefault' to only retrieve attributes that are not set to default |
PLCORE_API void PLCore::Object::SetValuesXml | ( | const XmlElement & | cElement | ) |
Set attribute values from XML.
[out] | cElement | XML element |
PLCORE_API void PLCore::Object::SetDefaultValues | ( | ) |
Set all attributes to default.
virtual PLCORE_API String PLCore::Object::ToString | ( | ) | const [virtual] |
Get object as string.
virtual PLCORE_API void PLCore::Object::FromString | ( | const String & | sString | ) | [virtual] |
Set object from string.
[in] | sString | String representation of object |
virtual PLCORE_API XmlElement PLCore::Object::ToXml | ( | ) | const [virtual] |
Get object as XML.
virtual PLCORE_API void PLCore::Object::FromXml | ( | const XmlElement & | cElement | ) | [virtual] |
Set object from XML.
[in] | cElement | XML representation of object |
|