The base class for all high level classes in the engine
inherit from this class all the classes that need properties or are themselves base classes for other objects.
More...
#include <nyBase.h>

Public Member Functions | |
| Base () | |
| Base (Base &rBase) | |
| virtual | ~Base () |
| virtual EResult | copy (Base *pFrom) |
| copy all object data from another Base derived object | |
| virtual Base * | clone () |
| clone this class and return the clone | |
| virtual EResult | preCache () |
| called when this object must precache its internal data | |
| virtual EResult | loadFromStream (Stream *pStream) |
| serialize the object, load from a stream | |
| virtual EResult | saveToStream (Stream *pStream) |
| serialize the object, save to a stream | |
| void | setPropertiesFromXmlElements (XmlElement *pPropertiesParent) |
| set properties from an xml parent element, with <property name="SomeProperty" value="some value"> child elements | |
| void | setAttributesFromXmlElements (XmlElement *pAttributesParent) |
| set attributes from an xml parent element, with <attribute name="SomeAttr" value="some value"> child elements | |
| void | savePropertiesToXmlDocument (XmlDocument *pDoc) |
| save properties to XML document | |
| void | saveAttributesToXmlDocument (XmlDocument *pDoc) |
| save attributes to XML document | |
| void | copyPropertiesFrom (Base *pOther) |
| copy properties from another Base class properties | |
| bool | getPropertyByName (const char *pName, Property *pProp) |
| void | setPropertyValue (const char *pName, voidptr pData) |
| set a property's value by property name | |
| void | setPropertyValue (uint32 aIndex, voidptr pData) |
| set a property's value by property index | |
| void | setPropertyValueFromText (const char *pName, const char *pData) |
| set a property's value by property name from text, it will convert the text into the property's type, for example boolean has text values 'yes' and 'no' | |
| void | setPropertyValueFromText (uint32 aIndex, const char *pData) |
| set a property's value by property index from text, it will convert the text into the property's type, for example boolean has text values 'yes' and 'no' | |
| void | getPropertyValue (const char *pName, voidptr pData) |
| void | getPropertyValue (uint32 aIndex, voidptr pData) |
| void | getPropertyValueAsText (const char *pName, string &rText) |
| void | getPropertyValueAsText (uint32 aIndex, string &rText) |
| string | getPropertyValueAsText (const char *pName) |
| string | getPropertyValueAsText (uint32 aIndex) |
| EResult | savePropertiesToStream (Stream *pStream, bool bFullInfo=false) |
| save the properties, raw data to the specified pStream stream | |
| EResult | loadPropertiesFromStream (Stream *pStream, bool bFullInfo=false) |
| load the properties, raw data from the specified pStream stream | |
| virtual void | onPropertyValueChanged (voidptr pPropertyData) |
| called when a property value was changed | |
| virtual void | onFormatGetPropertyValue (voidptr pPropertyData, string &rOutValue) |
| called when the property value is returned as text, set rOutValue to custom formatted the value this method is called only when a property has the ePropertyFlag_CustomValueFormat set | |
| virtual void | onFormatSetPropertyValue (voidptr pPropertyData, const char *pInValue) |
| called when the property is set from a text value, so you can modify directly the value from text this method is called only when a property has the ePropertyFlag_CustomValueFormat set | |
| string & | getName () |
| virtual const char * | getClassName () |
| RTTI - get the class name of this object, static pointer to a constant text. | |
| string & | getFileName () |
| uint32 | getId () |
| ESuperClassId | getSuperClassId () |
| uint32 | getType () |
| bool | isValid () |
| virtual uint32 | getUsedMemory () |
| virtual uint32 | getPropertyCount () |
| map< string, string > & | getAttributes () |
| string | getAttribute (const char *pAttrName) |
| virtual EResult | setName (const char *pNewValue) |
| virtual EResult | setNumberedName (const char *pNewValue) |
| set the name of the object appending its id number: eg. | |
| virtual EResult | setFileName (const char *pNewValue) |
| set the objects's file name, from which its data was loaded/saved | |
| virtual EResult | setId (uint32 aNewValue) |
| set the object's unique ID | |
| virtual EResult | setSuperClassId (ESuperClassId aNewValue) |
| set object's super class ID, see nyCommon.h for ID values | |
| virtual EResult | setType (uint32 aNewValue) |
| set user defined type | |
| virtual void | setValid (bool bValue) |
| set true if this node is valid | |
| virtual EResult | setUsedMemory (uint32 aNewValue) |
| set the amount of used memory used by this object | |
| virtual void | setAttribute (const char *pAttrName, const char *pValue) |
| set an attribute's value, if pValue is NULL, the attribute will be deleted | |
| virtual void | renameAttribute (const char *pAttrName, const char *pNewName) |
| rename an attribute | |
| virtual void | deleteAttribute (const char *pAttrName) |
| delete an attribute | |
| virtual void | setUserData (voidptr pData) |
| set custom user data pointer | |
| voidptr | getUserData () |
Data Fields | |
| NYTRO_CLASS_HAS_PROPERTIES | |
Protected Attributes | |
| string | m_name |
| string | m_fileName |
| map< string, string > | m_attributes |
| bool | m_bValid |
| uint32 | m_id |
| uint32 | m_type |
| uint32 | m_usedMemory |
| uint32 | m_propertyCount |
| ESuperClassId | m_superClassId |
| voidptr | m_pUserData |
Static Protected Attributes | |
| static uint32 | m_instanceCount |
The base class for all high level classes in the engine
inherit from this class all the classes that need properties or are themselves base classes for other objects.
Definition at line 42 of file nyBase.h.
| Nytro::Core::Base::Base | ( | ) |
| Nytro::Core::Base::Base | ( | Base & | rBase | ) |
| virtual Nytro::Core::Base::~Base | ( | ) | [virtual] |
| virtual Base* Nytro::Core::Base::clone | ( | ) | [virtual] |
clone this class and return the clone
Reimplemented in Nytro::Graphics::GeometryVertexBuffer, Nytro::Graphics::GeometryIndexBuffer, and Nytro::Graphics::GeometryBuffer.
copy all object data from another Base derived object
Reimplemented in Nytro::Network::NetPacket, Nytro::Scene::Billboard, Nytro::Scene::ParticleSystem, Nytro::Scene::SceneNode, and Nytro::Scene::SpecialEffect.
| void Nytro::Core::Base::copyPropertiesFrom | ( | Base * | pOther | ) |
copy properties from another Base class properties
| virtual void Nytro::Core::Base::deleteAttribute | ( | const char * | pAttrName | ) | [virtual] |
delete an attribute
| string Nytro::Core::Base::getAttribute | ( | const char * | pAttrName | ) |
| map<string,string>& Nytro::Core::Base::getAttributes | ( | ) |
| virtual const char* Nytro::Core::Base::getClassName | ( | ) | [virtual] |
RTTI - get the class name of this object, static pointer to a constant text.
| string& Nytro::Core::Base::getFileName | ( | ) |
| uint32 Nytro::Core::Base::getId | ( | ) |
| string& Nytro::Core::Base::getName | ( | ) |
| bool Nytro::Core::Base::getPropertyByName | ( | const char * | pName, | |
| Property * | pProp | |||
| ) |
| virtual uint32 Nytro::Core::Base::getPropertyCount | ( | ) | [virtual] |
| void Nytro::Core::Base::getPropertyValue | ( | const char * | pName, | |
| voidptr | pData | |||
| ) |
| pName | the name of the property | |
| pData | the value data, depends on the property type |
| aIndex | the index of the property | |
| pData | the value data, depends on the property type |
| void Nytro::Core::Base::getPropertyValueAsText | ( | const char * | pName, | |
| string & | rText | |||
| ) |
| pName | the name of the property | |
| rText | the destination string reference |
| void Nytro::Core::Base::getPropertyValueAsText | ( | uint32 | aIndex, | |
| string & | rText | |||
| ) |
| aIndex | the index of the property | |
| rText | the destination string reference |
| string Nytro::Core::Base::getPropertyValueAsText | ( | const char * | pName | ) |
| pName | the name of the property |
| string Nytro::Core::Base::getPropertyValueAsText | ( | uint32 | aIndex | ) |
| pIndex | the index of the property |
| ESuperClassId Nytro::Core::Base::getSuperClassId | ( | ) |
| uint32 Nytro::Core::Base::getType | ( | ) |
| virtual uint32 Nytro::Core::Base::getUsedMemory | ( | ) | [virtual] |
| voidptr Nytro::Core::Base::getUserData | ( | ) |
| bool Nytro::Core::Base::isValid | ( | ) |
serialize the object, load from a stream
Reimplemented from Nytro::Core::Serializable.
load the properties, raw data from the specified pStream stream
| pStream | the stream | |
| bFullInfo | used to store additional data, so when a property is deleted, the object will still load the other properties correctly |
| virtual void Nytro::Core::Base::onFormatGetPropertyValue | ( | voidptr | pPropertyData, | |
| string & | rOutValue | |||
| ) | [virtual] |
called when the property value is returned as text, set rOutValue to custom formatted the value this method is called only when a property has the ePropertyFlag_CustomValueFormat set
| virtual void Nytro::Core::Base::onFormatSetPropertyValue | ( | voidptr | pPropertyData, | |
| const char * | pInValue | |||
| ) | [virtual] |
called when the property is set from a text value, so you can modify directly the value from text this method is called only when a property has the ePropertyFlag_CustomValueFormat set
| virtual void Nytro::Core::Base::onPropertyValueChanged | ( | voidptr | pPropertyData | ) | [virtual] |
called when a property value was changed
Reimplemented in Nytro::Game::PropertyValueFlowGraphNode.
| virtual EResult Nytro::Core::Base::preCache | ( | ) | [virtual] |
called when this object must precache its internal data
| virtual void Nytro::Core::Base::renameAttribute | ( | const char * | pAttrName, | |
| const char * | pNewName | |||
| ) | [virtual] |
rename an attribute
| void Nytro::Core::Base::saveAttributesToXmlDocument | ( | XmlDocument * | pDoc | ) |
save attributes to XML document
save the properties, raw data to the specified pStream stream
| pStream | the stream | |
| bFullInfo | used to store additional data, so when a property is deleted, the object will still load the other properties correctly |
| void Nytro::Core::Base::savePropertiesToXmlDocument | ( | XmlDocument * | pDoc | ) |
save properties to XML document
serialize the object, save to a stream
Reimplemented from Nytro::Core::Serializable.
| virtual void Nytro::Core::Base::setAttribute | ( | const char * | pAttrName, | |
| const char * | pValue | |||
| ) | [virtual] |
set an attribute's value, if pValue is NULL, the attribute will be deleted
| void Nytro::Core::Base::setAttributesFromXmlElements | ( | XmlElement * | pAttributesParent | ) |
set attributes from an xml parent element, with <attribute name="SomeAttr" value="some value"> child elements
| virtual EResult Nytro::Core::Base::setFileName | ( | const char * | pNewValue | ) | [virtual] |
set the objects's file name, from which its data was loaded/saved
| virtual EResult Nytro::Core::Base::setName | ( | const char * | pNewValue | ) | [virtual] |
| virtual EResult Nytro::Core::Base::setNumberedName | ( | const char * | pNewValue | ) | [virtual] |
set the name of the object appending its id number: eg.
Light01
| pNewValue | is the base name, example: "Light", name will be set as Light01 |
| void Nytro::Core::Base::setPropertiesFromXmlElements | ( | XmlElement * | pPropertiesParent | ) |
set properties from an xml parent element, with <property name="SomeProperty" value="some value"> child elements
| void Nytro::Core::Base::setPropertyValue | ( | const char * | pName, | |
| voidptr | pData | |||
| ) |
set a property's value by property name
| pName | the name of the property | |
| pData | the value data, depends on the property type |
set a property's value by property index
| aIndex | the index of the property | |
| pData | the value data, depends on the property type |
| void Nytro::Core::Base::setPropertyValueFromText | ( | uint32 | aIndex, | |
| const char * | pData | |||
| ) |
set a property's value by property index from text, it will convert the text into the property's type, for example boolean has text values 'yes' and 'no'
| aIndex | the index of the property | |
| pData | the value data, depends on the property type |
| void Nytro::Core::Base::setPropertyValueFromText | ( | const char * | pName, | |
| const char * | pData | |||
| ) |
set a property's value by property name from text, it will convert the text into the property's type, for example boolean has text values 'yes' and 'no'
| pName | the name of the property | |
| pData | the value data, depends on the property type |
| virtual EResult Nytro::Core::Base::setSuperClassId | ( | ESuperClassId | aNewValue | ) | [virtual] |
set object's super class ID, see nyCommon.h for ID values
set the amount of used memory used by this object
| virtual void Nytro::Core::Base::setUserData | ( | voidptr | pData | ) | [virtual] |
set custom user data pointer
| virtual void Nytro::Core::Base::setValid | ( | bool | bValue | ) | [virtual] |
set true if this node is valid
map<string,string> Nytro::Core::Base::m_attributes [protected] |
bool Nytro::Core::Base::m_bValid [protected] |
string Nytro::Core::Base::m_fileName [protected] |
uint32 Nytro::Core::Base::m_id [protected] |
uint32 Nytro::Core::Base::m_instanceCount [static, protected] |
Reimplemented in Nytro::Graphics::GeometryInstanceBuffer.
string Nytro::Core::Base::m_name [protected] |
Reimplemented in Nytro::Network::NetClientInfo.
uint32 Nytro::Core::Base::m_propertyCount [protected] |
voidptr Nytro::Core::Base::m_pUserData [protected] |
ESuperClassId Nytro::Core::Base::m_superClassId [protected] |
uint32 Nytro::Core::Base::m_type [protected] |
uint32 Nytro::Core::Base::m_usedMemory [protected] |
Reimplemented in Nytro::Game::SetPropertyFlowGraphNode, Nytro::Game::ExpressionConditionFlowGraphNode, Nytro::Game::BooleanConditionFlowGraphNode, Nytro::Game::PropertyValueFlowGraphNode, Nytro::Scene::Camera, Nytro::Scene::ParticleSystemCtrlInitialPosition, Nytro::Scene::ParticleSystemCtrlInitialVelocity, Nytro::Scene::ParticleSystemCtrlInitialSpeed, Nytro::Scene::ParticleSystemCtrlColor, Nytro::Scene::ParticleSystemCtrlSize, Nytro::Scene::ParticleSystemCtrlSpin, Nytro::Scene::ParticleSystemCtrlEmission, Nytro::Scene::ParticleSystemCtrlLife, Nytro::Scene::ParticleSystemCtrlShading, Nytro::Scene::ParticleSystemCtrlForce, Nytro::Scene::ParticleSystemCtrlEvent, and Nytro::Scene::SceneNode.