Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _XNV_MESSAGE_H_
00010 #define _XNV_MESSAGE_H_
00011
00012 #include "XnVNiteDefs.h"
00013
00014
00015 #define XNV_GET_SPECIFIC_MESSAGE_BY_TYPE(pMessage, SpecificType, strTypeDescription) \
00016 dynamic_cast<SpecificType*>((*pMessage)[strTypeDescription])
00017
00018 #define XNV_GET_SPECIFIC_MESSAGE(pMessage, SpecificType) \
00019 XNV_GET_SPECIFIC_MESSAGE_BY_TYPE(pMessage, SpecificType, SpecificType::ms_strType)
00020
00025 class XNV_NITE_API XnVMessage
00026 {
00027 public:
00034 XnVMessage(const XnChar* strType, void* pData);
00035 virtual ~XnVMessage();
00036
00042 void* GetData();
00043
00052 virtual XnVMessage* operator[](const XnChar* strType);
00053
00059 const XnChar* GetType() const;
00065 virtual XnVMessage* Clone() const = 0;
00066 protected:
00067 XnChar* m_strType;
00068 void* m_pData;
00069
00070 XnBool m_bFreeOnDestruction;
00071 };
00072
00073 #endif // _XNV_MESSAGE_H_