My Project
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
ParaEngine::CAttributeField Class Reference

for a single attribute field More...

#include <AttributeField.h>

Classes

union  any_offset
 

Public Member Functions

void SetFieldname (const string &sFieldname)
 
const string & GetFieldname () const
 
size_t GetHash () const
 
const char * GetTypeAsString ()
 get the field type as string More...
 
bool HasGetFunction ()
 whether has get function. More...
 
bool HasSetFunction ()
 whether has set function. More...
 
HRESULT Call (void *obj)
 
HRESULT Get (void *obj)
 
template<class datatype >
HRESULT Set (void *obj, datatype p1)
 
HRESULT Set (void *obj, const Matrix4 &p1)
 
template<class datatype >
HRESULT Set (void *obj, datatype p1, datatype p2)
 
template<class datatype >
HRESULT Set (void *obj, datatype p1, datatype p2, datatype p3)
 
template<class datatype >
HRESULT Set (void *obj, datatype p1, datatype p2, datatype p3, datatype p4)
 
template<class datatype >
HRESULT Get (void *obj, datatype *p1)
 
template<class datatype >
HRESULT Get (void *obj, datatype *p1, datatype *p2)
 
template<class datatype >
HRESULT Get (void *obj, datatype *p1, datatype *p2, datatype *p3)
 
template<class datatype >
HRESULT Get (void *obj, datatype *p1, datatype *p2, datatype *p3, datatype *p4)
 
const char * GetSchematicsType ()
 parse the schema type from the schema string. More...
 
bool GetSchematicsMinMax (float &fMin, float &fMax)
 parse the schema min max value from the schema string. More...
 

Static Public Member Functions

static const char * GetSimpleSchema (SIMPLE_SCHEMA schema)
 attribute schematics: All simple schematics start with ':', they are mostly used in script. More...
 
static const char * GetSimpleSchemaOfRGB ()
 
static const char * GetSimpleSchemaOfFile ()
 
static const char * GetSimpleSchemaOfScript ()
 
static const char * GetSimpleSchemaOfInt (int nMin, int nMax)
 
static const char * GetSimpleSchemaOfFloat (float nMin, float nMax)
 

Public Attributes

any_offset m_offsetSetFunc
 
any_offset m_offsetGetFunc
 
DWORD m_type
 see ATTRIBUTE_FIELDTYPE
 
string m_sSchematics
 additional schematics for describing the display format of the data. More...
 
string m_sHelpString
 a help string. More...
 

Static Public Attributes

static std::hash< string > HashFunc
 

Protected Attributes

string m_sFieldname
 field name: e.g. More...
 
size_t m_hash
 

Detailed Description

for a single attribute field

Member Function Documentation

§ GetSchematicsMinMax()

bool CAttributeField::GetSchematicsMinMax ( float &  fMin,
float &  fMax 
)

parse the schema min max value from the schema string.

Parameters
fMin: [out]if the schema does not contain a min value, the default value which is smallest float.
fMax: [out]if the schema does not contain a max value, the default value which is largest float.
Returns
true if found min max.

§ GetSchematicsType()

const char * CAttributeField::GetSchematicsType ( )

parse the schema type from the schema string.

Returns
: simple schema type. it may be any of the following value. unspecified: "" color3 ":rgb" file ":file" script ":script" integer ":int" float ":float"

§ GetSimpleSchema()

const char * CAttributeField::GetSimpleSchema ( SIMPLE_SCHEMA  schema)
static

attribute schematics: All simple schematics start with ':', they are mostly used in script.

color3 ":rgb" file ":file" script ":script" integer ":int{min, max}" float ":float{min, max}"

Parameters
schema
Returns

§ GetTypeAsString()

const char * CAttributeField::GetTypeAsString ( )

get the field type as string

Returns
one of the following type may be returned "void" "bool" "string" "int" "float" "float_float" "float_float_float" "double" "vector2" "vector3" "vector4" "enum" "deprecated" ""

§ HasGetFunction()

bool ParaEngine::CAttributeField::HasGetFunction ( )
inline

whether has get function.

§ HasSetFunction()

bool ParaEngine::CAttributeField::HasSetFunction ( )
inline

whether has set function.

Member Data Documentation

§ m_sFieldname

string ParaEngine::CAttributeField::m_sFieldname
protected

field name: e.g.

"base.position"

§ m_sHelpString

string ParaEngine::CAttributeField::m_sHelpString

a help string.

§ m_sSchematics

string ParaEngine::CAttributeField::m_sSchematics

additional schematics for describing the display format of the data.

Different attribute type have different schematics.

See also
GetSimpleSchema()

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