Gizmo3D

gzDynamic.h File Reference

#include "gzBase.h"
#include "gzSerialize.h"
#include "gzExceptions.h"
#include "gzReference.h"
#include "gzNotify.h"
#include "gzGuid.h"

Go to the source code of this file.

Classes

class  gzDynRefList
class  gzDynamicType
class  gzDynamicTypeVoid
class  gzDynamicTypeChain
 A dynamic method invokation can resturn this to chain the result evaluation to a higher level. More...
class  gzDynamicTypeError
class  gzDynamicTypeLongLong
class  gzDynamicTypeArray
class  gzDynamicMethodID
class  gzDynamicEventData
class  gzDynamicEventNotifyInterface
class  gzDynamicInvokeInterface
class  gzDynamicEventInterface
class  gzDynamicTypeCustom< T >
class  gzDynamicTypeContainer
 A generic serializeable dictionary for gzDynamicTypes. More...
class  gzDynamicTypeContainerIterator
class  gzDynamicMethodChain< T, Base >
class  gzDynamicMethodChain< T, Base >::gzDynamicMethodChainData

Defines

#define GZ_DYN_ARG(n)   const gzDynamicType &a##n
#define GZ_DYN_ARG_TYPE(n)   const gzString &t##n
#define GZ_DYN_ARG_NULL(n)   const gzString &t##n=GZ_EMPTY_STRING
#define GZ_DYN_ARG_VOID(n)   GZ_DYN_ARG(n)=GZ_DYN_VOID
#define GZ_DYN_ARG_TYPE_VOID(n)   GZ_DYN_ARG_TYPE(n)=GZ_DYNAMIC_TYPE_VOID
#define GZ_DYNAMIC_ATTRIBUTE_LIST
#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST
#define GZ_DYNAMIC_ATTRIBUTE_LIST_IMP
#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST_IMP
#define GZ_DYNAMIC_ATTRIBUTE_LIST_IMP_FORWARD   a0,a1,a2,a3,a4,a5,a6,a7,a8,a9
#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST_IMP_FORWARD   t0,t1,t2,t3,t4,t5,t6,t7,t8,t9
#define GZ_DYA_9   gzDynamicTypeVoid()
#define GZ_DYA_8   GZ_DYA_9,gzDynamicTypeVoid()
#define GZ_DYA_7   GZ_DYA_8,gzDynamicTypeVoid()
#define GZ_DYA_6   GZ_DYA_7,gzDynamicTypeVoid()
#define GZ_DYA_5   GZ_DYA_6,gzDynamicTypeVoid()
#define GZ_DYA_4   GZ_DYA_5,gzDynamicTypeVoid()
#define GZ_DYA_3   GZ_DYA_4,gzDynamicTypeVoid()
#define GZ_DYA_2   GZ_DYA_3,gzDynamicTypeVoid()
#define GZ_DYA_1   GZ_DYA_2,gzDynamicTypeVoid()
#define GZ_DYA_0   GZ_DYA_1,gzDynamicTypeVoid()
#define GZ_DYT_9   GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_8   GZ_DYT_9,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_7   GZ_DYT_8,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_6   GZ_DYT_7,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_5   GZ_DYT_6,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_4   GZ_DYT_5,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_3   GZ_DYT_4,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_2   GZ_DYT_3,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_1   GZ_DYT_2,GZ_DYNAMIC_TYPE_VOID
#define GZ_DYT_0   GZ_DYT_1,GZ_DYNAMIC_TYPE_VOID
#define gzMethodPtr(x)   x
#define DYN_ARG_CHECK(n)   if(t##n.length()){data->useArgTypeCheck=TRUE;data->argTypeCheck[n]=t##n;}

Typedefs

typedef gzDynamicTypeCustom<
gzDynamicTypeContainer
gzDynamicTypeContainerData

Enumerations

enum  gzDynamicTypeEvent {
  GZ_DYNAMIC_EVENT_REMOVE_ATTRIBUTE, GZ_DYNAMIC_EVENT_SET_ATTRIBUTE, GZ_DYNAMIC_EVENT_REMOVE_ALL_ATTRIBUTES, GZ_DYNAMIC_EVENT_ADD_USERDATA,
  GZ_DYNAMIC_EVENT_REMOVE_USERDATA
}
 Events generated from the gzDynamicTypeContainer. More...

Functions

gzBool GZ_FAIL (const gzDynamicType &result)
gzBool GZ_TEST_FAIL (const gzDynamicType &result)
gzBool GZ_SUCCESS (const gzDynamicType &result)
gzBool GZ_TEST_SUCCESS (const gzDynamicType &result)
typedef gzDynamicType (GZ_CALLBACK *gzDynamicMethod)(gzDynamicInvokeInterface *
gzArray< gzDynamicTypegzGetStringArguments (const gzString &params)
template<class T>
gzDynamic_Cast (const gzDynamicType &data)
template<class T>
gzBool gzDynamic_Cast (const gzDynamicType &data, T &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzString &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzDouble &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzGUID &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzVec2 &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzVec3 &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzVec4 &result)
template<>
gzBool gzDynamic_Cast (const gzDynamicType &data, gzArray< gzDynamicType > &result)
template<>
gzVoid writeAdapter (gzSerializeAdapter *adapter, const gzDynamicType &data, const gzBool useBigEndian)
template<>
gzVoid pushBackAdapter (gzSerializeAdapter *adapter, const gzDynamicType &data, const gzBool useBigEndian)
template<>
gzBool readAdapter (gzSerializeAdapter *adapter, gzDynamicType &data, const gzBool useBigEndian)
template<>
gzULong getDataSize (gzSerializeAdapter *adapter, const gzDynamicType &data, const gzBool useBigEndian)

Variables

const gzString IIDS_DEBUG = "debug"
const gzULongLong IID_DEBUG = LL(0x7fffffff00000001)
const gzString IIDS_VERSION = "version"
const gzULongLong IID_VERSION = LL(0x7fffffff00000002)
const gzString IIDS_LICENSE_EXPIRE_DAYS = "licenseExpireDays"
const gzULongLong IID_LICENSE_EXPIRE_DAYS = LL(0x7fffffff00000003)
const gzString IIDS_TEST = "test"
const gzULongLong IID_TEST = LL(0x7fffffff00000004)
const gzULongLong IID_NOT_SUPPORTED = LL(0xFFFFFFFFFFFFFFFF)
const gzUShort GZ_DYNAMIC_TYPE_STRING_UNIQUE_ID = 1
const gzUShort GZ_DYNAMIC_TYPE_VOID_UNIQUE_ID = 2
const gzUShort GZ_DYNAMIC_TYPE_NUMBER_UNIQUE_ID = 3
const gzUShort GZ_DYNAMIC_TYPE_POINTER_UNIQUE_ID = 4
const gzUShort GZ_DYNAMIC_TYPE_REFERENCE_UNIQUE_ID = 5
const gzUShort GZ_DYNAMIC_TYPE_ERROR_UNIQUE_ID = 6
const gzUShort GZ_DYNAMIC_TYPE_LONGLONG_UNIQUE_ID = 7
const gzUShort GZ_DYNAMIC_TYPE_ARRAY_UNIQUE_ID = 8
const gzUShort GZ_DYNAMIC_TYPE_VEC2_UNIQUE_ID = 9
const gzUShort GZ_DYNAMIC_TYPE_VEC3_UNIQUE_ID = 10
const gzUShort GZ_DYNAMIC_TYPE_VEC4_UNIQUE_ID = 11
const gzUShort GZ_DYNAMIC_TYPE_CONTAINER_UNIQUE_ID = 12
const gzUShort GZ_DYNAMIC_TYPE_CHAIN_UNIQUE_ID = 13
const gzUShort GZ_DYNAMIC_TYPE_GUID_UNIQUE_ID = 19
const gzString GZ_DYNAMIC_TYPE_STRING = gzUniqueString("str" ,GZ_DYNAMIC_TYPE_STRING_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_VOID = gzUniqueString("void" ,GZ_DYNAMIC_TYPE_VOID_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_NUMBER = gzUniqueString("num" ,GZ_DYNAMIC_TYPE_NUMBER_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_POINTER = gzUniqueString("ptr" ,GZ_DYNAMIC_TYPE_POINTER_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_REFERENCE = gzUniqueString("ref" ,GZ_DYNAMIC_TYPE_REFERENCE_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_ERROR = gzUniqueString("error" ,GZ_DYNAMIC_TYPE_ERROR_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_LONGLONG = gzUniqueString("llnum" ,GZ_DYNAMIC_TYPE_LONGLONG_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_ARRAY = gzUniqueString("array" ,GZ_DYNAMIC_TYPE_ARRAY_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_VEC2 = gzUniqueString("vec2" ,GZ_DYNAMIC_TYPE_VEC2_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_VEC3 = gzUniqueString("vec3" ,GZ_DYNAMIC_TYPE_VEC3_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_VEC4 = gzUniqueString("vec4" ,GZ_DYNAMIC_TYPE_VEC4_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_CONTAINER = gzUniqueString("cont" ,GZ_DYNAMIC_TYPE_CONTAINER_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_CHAIN = gzUniqueString("chain" ,GZ_DYNAMIC_TYPE_CHAIN_UNIQUE_ID)
const gzString GZ_DYNAMIC_TYPE_GUID = gzUniqueString("guid" ,GZ_DYNAMIC_TYPE_GUID_UNIQUE_ID)
const gzUByte GZ_UNIQUE_ID_ESCAPE_TOKEN = 0xfc
 Dynamic String Serialize esqape secuence.
const gzString GZ_DYNAMIC_ERROR_VALUE_NOT_SET = gzUniqueString("Value not set" ,14)
const gzString GZ_DYNAMIC_ERROR_NOT_IMPLEMENTED = gzUniqueString("Not implemented" ,15)
const gzString GZ_DYNAMIC_ERROR_NO_ERROR = gzUniqueString("OK" ,16)
const gzString GZ_DYNAMIC_ERROR_TEST_OK = gzUniqueString("Test OK" ,17)
const gzString GZ_DYNAMIC_ERROR_TEST_FAIL = gzUniqueString("Test FAIL" ,18)
const gzDynamicTypeError GZ_DYN_ERR_OK (GZ_DYNAMIC_ERROR_NO_ERROR)
 Default no error (Ok value) in a gzDynamicTypeError.
const gzDynamicTypeError GZ_DYN_TEST_OK (GZ_DYNAMIC_ERROR_TEST_OK)
const gzDynamicTypeError GZ_DYN_TEST_FAIL (GZ_DYNAMIC_ERROR_TEST_FAIL)
const gzDynamicTypeVoid GZ_DYN_VOID
typedef GZ_DYNAMIC_ATTRIBUTE_LIST_IMP
const gzString GZ_UNDEFINED_METHOD_NAME = "UnDefMethod"
gzDynamicTypeError gzCheckDynamicArgumentList (GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST_IMP, GZ_DYNAMIC_ATTRIBUTE_LIST_IMP)
 Check function for dynamic attributes.


Define Documentation

#define DYN_ARG_CHECK  )     if(t##n.length()){data->useArgTypeCheck=TRUE;data->argTypeCheck[n]=t##n;}
 

Definition at line 965 of file gzDynamic.h.

#define GZ_DYA_0   GZ_DYA_1,gzDynamicTypeVoid()
 

Definition at line 394 of file gzDynamic.h.

#define GZ_DYA_1   GZ_DYA_2,gzDynamicTypeVoid()
 

Definition at line 393 of file gzDynamic.h.

#define GZ_DYA_2   GZ_DYA_3,gzDynamicTypeVoid()
 

Definition at line 392 of file gzDynamic.h.

#define GZ_DYA_3   GZ_DYA_4,gzDynamicTypeVoid()
 

Definition at line 391 of file gzDynamic.h.

#define GZ_DYA_4   GZ_DYA_5,gzDynamicTypeVoid()
 

Definition at line 390 of file gzDynamic.h.

#define GZ_DYA_5   GZ_DYA_6,gzDynamicTypeVoid()
 

Definition at line 389 of file gzDynamic.h.

#define GZ_DYA_6   GZ_DYA_7,gzDynamicTypeVoid()
 

Definition at line 388 of file gzDynamic.h.

#define GZ_DYA_7   GZ_DYA_8,gzDynamicTypeVoid()
 

Definition at line 387 of file gzDynamic.h.

#define GZ_DYA_8   GZ_DYA_9,gzDynamicTypeVoid()
 

Definition at line 386 of file gzDynamic.h.

#define GZ_DYA_9   gzDynamicTypeVoid()
 

Definition at line 385 of file gzDynamic.h.

#define GZ_DYN_ARG  )     const gzDynamicType &a##n
 

Definition at line 329 of file gzDynamic.h.

#define GZ_DYN_ARG_NULL  )     const gzString &t##n=GZ_EMPTY_STRING
 

Definition at line 331 of file gzDynamic.h.

#define GZ_DYN_ARG_TYPE  )     const gzString &t##n
 

Definition at line 330 of file gzDynamic.h.

#define GZ_DYN_ARG_TYPE_VOID  )     GZ_DYN_ARG_TYPE(n)=GZ_DYNAMIC_TYPE_VOID
 

Definition at line 334 of file gzDynamic.h.

#define GZ_DYN_ARG_VOID  )     GZ_DYN_ARG(n)=GZ_DYN_VOID
 

Definition at line 333 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_LIST
 

Value:

Definition at line 338 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_LIST_IMP
 

Value:

Definition at line 360 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_LIST_IMP_FORWARD   a0,a1,a2,a3,a4,a5,a6,a7,a8,a9
 

Definition at line 382 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST
 

Value:

Definition at line 349 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST_IMP
 

Value:

Definition at line 371 of file gzDynamic.h.

#define GZ_DYNAMIC_ATTRIBUTE_TYPE_LIST_IMP_FORWARD   t0,t1,t2,t3,t4,t5,t6,t7,t8,t9
 

Definition at line 383 of file gzDynamic.h.

#define GZ_DYT_0   GZ_DYT_1,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 405 of file gzDynamic.h.

#define GZ_DYT_1   GZ_DYT_2,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 404 of file gzDynamic.h.

#define GZ_DYT_2   GZ_DYT_3,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 403 of file gzDynamic.h.

#define GZ_DYT_3   GZ_DYT_4,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 402 of file gzDynamic.h.

#define GZ_DYT_4   GZ_DYT_5,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 401 of file gzDynamic.h.

#define GZ_DYT_5   GZ_DYT_6,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 400 of file gzDynamic.h.

#define GZ_DYT_6   GZ_DYT_7,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 399 of file gzDynamic.h.

#define GZ_DYT_7   GZ_DYT_8,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 398 of file gzDynamic.h.

#define GZ_DYT_8   GZ_DYT_9,GZ_DYNAMIC_TYPE_VOID
 

Definition at line 397 of file gzDynamic.h.

#define GZ_DYT_9   GZ_DYNAMIC_TYPE_VOID
 

Definition at line 396 of file gzDynamic.h.

#define gzMethodPtr  )     x
 

Definition at line 957 of file gzDynamic.h.


Typedef Documentation

typedef gzDynamicTypeCustom<gzDynamicTypeContainer> gzDynamicTypeContainerData
 

Definition at line 766 of file gzDynamic.h.


Enumeration Type Documentation

enum gzDynamicTypeEvent
 

Events generated from the gzDynamicTypeContainer.

Enumerator:
GZ_DYNAMIC_EVENT_REMOVE_ATTRIBUTE 
GZ_DYNAMIC_EVENT_SET_ATTRIBUTE 
GZ_DYNAMIC_EVENT_REMOVE_ALL_ATTRIBUTES 
GZ_DYNAMIC_EVENT_ADD_USERDATA  Only valid for gzObject's gzUserData.
GZ_DYNAMIC_EVENT_REMOVE_USERDATA  Only valid for gzObject's gzUserData.

Definition at line 646 of file gzDynamic.h.


Function Documentation

template<>
gzULong getDataSize gzSerializeAdapter adapter,
const gzDynamicType data,
const gzBool  useBigEndian
[inline]
 

Definition at line 1317 of file gzDynamic.h.

References gzDynamicType::getDataSize().

gzBool GZ_FAIL const gzDynamicType result  ) 
 

gzBool GZ_SUCCESS const gzDynamicType result  ) 
 

gzBool GZ_TEST_FAIL const gzDynamicType result  ) 
 

gzBool GZ_TEST_SUCCESS const gzDynamicType result  ) 
 

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzArray< gzDynamicType > &  result
[inline]
 

Definition at line 943 of file gzDynamic.h.

References GZ_DYNAMIC_TYPE_ARRAY, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzVec4 result
[inline]
 

Definition at line 933 of file gzDynamic.h.

References gzDynamicType::getVec4(), GZ_DYNAMIC_TYPE_VEC4, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzVec3 result
[inline]
 

Definition at line 923 of file gzDynamic.h.

References gzDynamicType::getVec3(), GZ_DYNAMIC_TYPE_VEC3, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzVec2 result
[inline]
 

Definition at line 913 of file gzDynamic.h.

References gzDynamicType::getVec2(), GZ_DYNAMIC_TYPE_VEC2, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzGUID result
[inline]
 

Definition at line 903 of file gzDynamic.h.

References gzDynamicType::getGUID(), GZ_DYNAMIC_TYPE_GUID, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzDouble result
[inline]
 

Definition at line 893 of file gzDynamic.h.

References gzDynamicType::getNumber(), GZ_DYNAMIC_TYPE_NUMBER, gzDynamicType::is(), and TRUE.

template<>
gzBool gzDynamic_Cast const gzDynamicType data,
gzString result
[inline]
 

Definition at line 878 of file gzDynamic.h.

References gzDynamicType::getString(), GZ_DYNAMIC_TYPE_STRING, gzDynamicType::is(), and TRUE.

template<class T>
gzBool gzDynamic_Cast const gzDynamicType data,
T &  result
[inline]
 

Definition at line 804 of file gzDynamic.h.

References gzDynamicType::is(), and TRUE.

template<class T>
gzReference * gzDynamic_Cast const gzDynamicType data  )  [inline]
 

Definition at line 785 of file gzDynamic.h.

typedef gzDynamicType GZ_CALLBACK *  gzDynamicMethod  ) 
 

gzArray<gzDynamicType> gzGetStringArguments const gzString params  ) 
 

template<>
gzVoid pushBackAdapter gzSerializeAdapter adapter,
const gzDynamicType data,
const gzBool  useBigEndian
[inline]
 

Definition at line 1306 of file gzDynamic.h.

template<>
gzBool readAdapter gzSerializeAdapter adapter,
gzDynamicType data,
const gzBool  useBigEndian
[inline]
 

Definition at line 1311 of file gzDynamic.h.

References gzDynamicType::read(), and TRUE.

template<>
gzVoid writeAdapter gzSerializeAdapter adapter,
const gzDynamicType data,
const gzBool  useBigEndian
[inline]
 

Definition at line 1301 of file gzDynamic.h.


Variable Documentation

const gzDynamicTypeError GZ_DYN_ERR_OK(GZ_DYNAMIC_ERROR_NO_ERROR)
 

Default no error (Ok value) in a gzDynamicTypeError.

const gzDynamicTypeError GZ_DYN_TEST_FAIL(GZ_DYNAMIC_ERROR_TEST_FAIL)
 

const gzDynamicTypeError GZ_DYN_TEST_OK(GZ_DYNAMIC_ERROR_TEST_OK)
 

const gzDynamicTypeVoid GZ_DYN_VOID
 

Definition at line 322 of file gzDynamic.h.

typedef GZ_DYNAMIC_ATTRIBUTE_LIST_IMP
 

Definition at line 409 of file gzDynamic.h.

const gzString GZ_DYNAMIC_ERROR_NO_ERROR = gzUniqueString("OK" ,16)
 

Definition at line 237 of file gzDynamic.h.

const gzString GZ_DYNAMIC_ERROR_NOT_IMPLEMENTED = gzUniqueString("Not implemented" ,15)
 

Definition at line 236 of file gzDynamic.h.

const gzString GZ_DYNAMIC_ERROR_TEST_FAIL = gzUniqueString("Test FAIL" ,18)
 

Definition at line 239 of file gzDynamic.h.

const gzString GZ_DYNAMIC_ERROR_TEST_OK = gzUniqueString("Test OK" ,17)
 

Definition at line 238 of file gzDynamic.h.

const gzString GZ_DYNAMIC_ERROR_VALUE_NOT_SET = gzUniqueString("Value not set" ,14)
 

Definition at line 235 of file gzDynamic.h.

const gzString GZ_DYNAMIC_TYPE_ARRAY = gzUniqueString("array" ,GZ_DYNAMIC_TYPE_ARRAY_UNIQUE_ID)
 

Definition at line 75 of file gzDynamic.h.

const gzUShort GZ_DYNAMIC_TYPE_ARRAY_UNIQUE_ID = 8
 

Definition at line 58 of file gzDynamic.h.

const gzString GZ_DYNAMIC_TYPE_CHAIN = gzUniqueString("chain" ,GZ_DYNAMIC_TYPE_CHAIN_UNIQUE_ID)
 

Definition at line 80 of file gzDynamic.h.