My Project
Public Member Functions | List of all members
ParaEngine::CDynamicAttributesSet Class Reference

a group of dynamic attributes More...

#include <DynamicAttributesSet.h>

Inheritance diagram for ParaEngine::CDynamicAttributesSet:
ParaEngine::CRefCounted

Public Member Functions

CDynamicAttributeFieldGetDynamicField (const std::string &sName)
 Get a dynamic field with a given name. More...
 
CDynamicAttributeFieldGetDynamicField (int nIndex)
 Get a dynamic field with a given index. More...
 
const char * GetDynamicFieldNameByIndex (int nIndex)
 get field name by index
 
int GetDynamicFieldIndex (const std::string &sName)
 get field index More...
 
int GetDynamicFieldCount ()
 how many dynamic field this object currently have. More...
 
int SetDynamicField (const std::string &sName, const CVariable &value)
 set a dynamic field with a given name. More...
 
int AddDynamicField (const std::string &sName, ATTRIBUTE_FIELDTYPE dwType)
 add dynamic field and return field index
 
void RemoveAllDynamicFields ()
 remove all dynamic fields
 
int SaveDynamicFieldsToString (string &output)
 save only text dynamic fields to fieldname = value text strings. More...
 
int LoadDynamicFieldsFromString (const string &input)
 load only text dynamic fields from string More...
 
- Public Member Functions inherited from ParaEngine::CRefCounted
void addref () const
 add reference count of the object. More...
 
bool delref () const
 decrease reference count of the object. More...
 
int GetRefCount () const
 get the reference count
 
virtual int Release ()
 
CRefCountedAddToAutoReleasePool ()
 addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More...
 

Additional Inherited Members

- Protected Attributes inherited from ParaEngine::CRefCounted
int m_refcount
 

Detailed Description

a group of dynamic attributes

Member Function Documentation

§ GetDynamicField() [1/2]

CDynamicAttributeField * ParaEngine::CDynamicAttributesSet::GetDynamicField ( const std::string &  sName)

Get a dynamic field with a given name.

Parameters
sNamename of the field to set
Returns
: return the field or NULL if does not exist

§ GetDynamicField() [2/2]

CDynamicAttributeField * ParaEngine::CDynamicAttributesSet::GetDynamicField ( int  nIndex)

Get a dynamic field with a given index.

Parameters
sNamename of the field to set
Returns
: return the field or NULL if does not exist

§ GetDynamicFieldCount()

int ParaEngine::CDynamicAttributesSet::GetDynamicFieldCount ( )

how many dynamic field this object currently have.

§ GetDynamicFieldIndex()

int ParaEngine::CDynamicAttributesSet::GetDynamicFieldIndex ( const std::string &  sName)

get field index

Returns
-1 if not found.

§ LoadDynamicFieldsFromString()

int ParaEngine::CDynamicAttributesSet::LoadDynamicFieldsFromString ( const string &  input)

load only text dynamic fields from string

Returns
the number of fields loaded.

§ SaveDynamicFieldsToString()

int ParaEngine::CDynamicAttributesSet::SaveDynamicFieldsToString ( string &  output)

save only text dynamic fields to fieldname = value text strings.

one on each line. line separator is
.

Returns
the number of fields saved. or -1 if failed.

§ SetDynamicField()

int ParaEngine::CDynamicAttributesSet::SetDynamicField ( const std::string &  sName,
const CVariable value 
)

set a dynamic field with a given name.

if field not exist, it will create one.

Parameters
sNamename of the field to set : the value to add. if NULL, field will be removed.
Returns
: -1 failed, if 0 means modified, if 1 means a new key is added, if 2 means a key is removed.

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