XSIUserData.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _XSIUSERDATA_H
00015 #define _XSIUSERDATA_H
00016 
00017 #include "Template.h"
00018 
00019 #ifndef _SL_INT_ARRAY_PROXY_EXPORT_
00020 #define _SL_INT_ARRAY_PROXY_EXPORT_
00021 
00022 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SI_Int, SI_Int, 1>;
00023 
00024 #endif // _SL_INT_ARRAY_PROXY_EXPORT_
00025 
00026 #ifndef _SL_UBYTE_ARRAY_PROXY_EXPORT_
00027 #define _SL_UBYTE_ARRAY_PROXY_EXPORT_
00028 
00029 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SI_UByte, SI_UByte, 1>;
00030 
00031 #endif // _SL_UBYTE_ARRAY_PROXY_EXPORT_
00032 
00033 class CSLUserDataList;
00034 
00041 class XSIEXPORT CSLUserData
00042     : public CSLTemplate
00043 {
00044 public:
00045 
00047     typedef CSLArrayProxy<SI_UByte, SI_UByte, 1> CSLUByteArray;
00048 
00050     typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray;
00051 
00057     CSLUserData(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00058 
00060     virtual ~CSLUserData();
00061 
00065     ETemplateType Type(){ return XSI_USER_DATA; }
00066 
00070     SI_Error Synchronize();
00071 
00073     // User data //////////////////////////////////////////////////////////////
00075 
00079     SI_UByte* GetUserDataListPtr();
00080 
00084     CSLUByteArray* GetUserDataList();
00085 
00089     SI_Int GetUserDataCount();
00090 
00092     // Sub element access /////////////////////////////////////////////////////
00094 
00098     SI_Int* GetSubElementListPtr();
00099 
00103     CSLIntArray* GetSubElementList();
00104 
00108     SI_Int GetSubElementCount();
00109 
00110 private:
00111     CSLIntProxy m_DataSize;
00112     CSLUByteArray m_UserData;
00113     CSLIntArray m_SubElements;
00114 
00115     SI_Void* m_pReserved;
00116 };
00117 
00125 class XSIEXPORT CSLUserDataBlob
00126     : public CSLTemplate
00127 {
00128 public:
00129 
00131     typedef CSLArrayProxy<SI_UByte, SI_UByte, 1> CSLUByteArray;
00132 
00139     CSLUserDataBlob(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLTemplate* in_pAttachTo = NULL);
00140 
00142     virtual ~CSLUserDataBlob();
00143 
00147     ETemplateType Type(){ return XSI_USER_DATA_BLOB; }
00148 
00152     SI_Error Synchronize();
00153 
00155     // User data //////////////////////////////////////////////////////////////
00157 
00161     SI_UByte* GetUserDataPtr();
00162 
00166     CSLUByteArray* GetUserData();
00167 
00171     SI_Int GetUserDataSize();
00172 
00173 
00174 private:
00175     CSLIntProxy     m_DataSize;
00176     CSLUByteArray   m_UserData;
00177     CSLTemplate*        m_pOwner;
00178 
00179     SI_Void* m_pReserved;
00180 };
00181 
00182 
00183 #endif