My Project
Public Types | Public Member Functions | List of all members
ParaEngine::CAttributeClassImp< T > Class Template Reference

derived attribute class. More...

#include <AttributeClass.h>

Inheritance diagram for ParaEngine::CAttributeClassImp< T >:
ParaEngine::CAttributeClass

Public Types

typedef T classType
 
- Public Types inherited from ParaEngine::CAttributeClass
enum  Field_Order { Sort_ByName, Sort_ByCategory, Sort_ByInstallOrder }
 

Public Member Functions

 CAttributeClassImp (int nClassID, const char *sClassName, const char *sClassDescription)
 
virtual IAttributeFieldsCreate ()
 see class reference if classType::Create is not defined. More...
 
- Public Member Functions inherited from ParaEngine::CAttributeClass
 CAttributeClass (int nClassID, const char *sClassName, const char *sClassDescription)
 
void AddField (const char *sFieldname, DWORD Type, void *offsetSetFunc, void *offsetGetFunc, const char *sSchematics, const char *sHelpString, bool bOverride)
 add a new field. More...
 
void AddField_Deprecated (const char *fieldName, bool bOverride=true)
 use of deprecated field takes no effect and will output warning in the log. More...
 
bool RemoveField (const char *sFieldname)
 remove a field, return true if moved. More...
 
void RemoveAllFields ()
 
int GetClassID () const
 class ID
 
const char * GetClassName () const
 class name
 
const char * GetClassDescription () const
 class description
 
void SetOrder (Field_Order order)
 Set which order fields are saved. More...
 
Field_Order GetOrder ()
 get which order fields are saved. More...
 
int GetFieldNum ()
 get the total number of field. More...
 
CAttributeFieldGetField (int nIndex)
 get field at the specified index. More...
 
int GetFieldIndex (const char *sFieldname)
 get field index of a given field name. More...
 
int GetFieldIndex (const std::string &sFieldname)
 
CAttributeFieldGetField (const char *sFieldname)
 return NULL, if the field does not exists
 
CAttributeFieldGetField (const std::string &sFieldname)
 

Additional Inherited Members

- Protected Attributes inherited from ParaEngine::CAttributeClass
int m_nClassID
 
const char * m_sClassName
 
const char * m_sClassDescription
 
vector< CAttributeFieldm_attributes
 
Field_Order m_nCurrentOrder
 
bool m_bSort
 

Detailed Description

template<typename T>
class ParaEngine::CAttributeClassImp< T >

derived attribute class.

Class T should add following macro to its header in order to use this factory class ATTRIBUTE_SUPPORT_CREATE_FACTORY(CWeatherEffect); or T should have Create() method manually defined.

Member Function Documentation

§ Create()

template<typename T >
virtual IAttributeFields* ParaEngine::CAttributeClassImp< T >::Create ( )
inlinevirtual

see class reference if classType::Create is not defined.

Reimplemented from ParaEngine::CAttributeClass.


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