hkStressTestCinfo.h
上传用户:yisoukefu
上传日期:2020-08-09
资源大小:39506k
文件大小:8k
源码类别:

其他游戏

开发平台:

Visual C++

  1. /* 
  2.  * 
  3.  * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's
  4.  * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.
  5.  * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2009 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.
  6.  * 
  7.  */
  8. #ifndef DEMOS_TEST_UNITTEST_HKSERIALIZE_XML_HKSTRESSTESTCINFO_XML_H
  9. #define DEMOS_TEST_UNITTEST_HKSERIALIZE_XML_HKSTRESSTESTCINFO_XML_H
  10. #include <Common/Base/hkBase.h>
  11. #include <Common/Base/hkBase.h>
  12. /// hkStressTestCinfo meta information
  13. extern const class hkClass hkStressTestCinfoClass;
  14. /// A class to test all parts of the serialization infrastructure.
  15. class hkStressTestCinfo
  16. {
  17. public:
  18. HK_DECLARE_REFLECTION();
  19. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_DEMO, hkStressTestCinfo);
  20. ///
  21. enum AnEnum
  22. {
  23. ///
  24. VAL_INVALID,
  25. ///
  26. VAL_TEN=10,
  27. ///
  28. VAL_ELEVEN,
  29. ///
  30. VAL_TWENTY=20
  31. };
  32. ///
  33. struct SimpleStruct
  34. {
  35. HK_DECLARE_REFLECTION();
  36. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_DEMO, SimpleStruct);
  37. ///
  38. hkUint32 m_key;
  39. ///
  40. hkUint32 m_value;
  41. SimpleStruct() : m_key(0), m_value(0) {}
  42. SimpleStruct( const SimpleStruct& s ) : m_key(s.m_key), m_value(s.m_value) {}
  43. };
  44. ///
  45. struct AllPodsStruct
  46. {
  47. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_SERIALIZE, hkStressTestCinfo::AllPodsStruct );
  48. ///
  49. hkBool m_bool;
  50. ///
  51. hkChar m_char;
  52. ///
  53. hkInt8 m_int8;
  54. ///
  55. hkUint8 m_uint8;
  56. ///
  57. hkInt16 m_int16;
  58. ///
  59. hkUint16 m_uint16;
  60. ///
  61. hkInt32 m_int32;
  62. ///
  63. hkUint32 m_uint32;
  64. ///
  65. hkInt64 m_int64;
  66. ///
  67. hkUint64 m_uint64;
  68. ///
  69. hkReal m_real;
  70. ///
  71. hkVector4 m_vector4;
  72. ///
  73. hkQuaternion m_quaternion;
  74. ///
  75. hkMatrix3 m_matrix3;
  76. ///
  77. hkRotation m_rotation;
  78. ///
  79. hkMatrix4 m_matrix4;
  80. ///
  81. hkTransform m_transform;
  82. };
  83. ///
  84. struct StructWithVirtualFunctions
  85. {
  86. HK_DECLARE_REFLECTION();
  87. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_DEMO, StructWithVirtualFunctions);
  88. virtual ~StructWithVirtualFunctions() {}
  89. ///
  90. hkUint32 m_value;
  91. virtual void doesNothingMuch() = 0;
  92. };
  93. ///
  94. struct StructWithVtable : public hkStressTestCinfo::StructWithVirtualFunctions
  95. {
  96. HK_DECLARE_REFLECTION();
  97. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_DEMO, StructWithVtable);
  98. ///
  99. hkUint32 m_newvalue;
  100. virtual void doesNothingMuch() { m_newvalue = 1; }
  101. StructWithVtable() {}
  102. StructWithVtable( const StructWithVtable& s ) : StructWithVirtualFunctions(s), m_newvalue(s.m_newvalue) {}
  103. StructWithVtable( hkFinishLoadedObjectFlag flag ) {}
  104. };
  105. ///
  106. struct StructWithArrays
  107. {
  108. HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_SERIALIZE, hkStressTestCinfo::StructWithArrays );
  109. HK_DECLARE_REFLECTION();
  110. ///
  111. hkArray<hkUint32> m_anArray;
  112. ///
  113. hkArray<hkChar*> m_anArrayOfPointers;
  114. ///
  115. hkArray<struct StructWithVtable> m_anArrayOfStructs;
  116. StructWithArrays() {}
  117. StructWithArrays( const StructWithArrays& s ) {}
  118. };
  119. /// Default constructor
  120. hkStressTestCinfo() { }
  121. //
  122. // Members
  123. //
  124. public:
  125. ///
  126. hkBool m_simpleBool;
  127. ///
  128. hkChar m_simpleChar;
  129. ///
  130. hkInt8 m_simpleInt8;
  131. ///
  132. hkUint8 m_simpleUint8;
  133. ///
  134. hkInt16 m_simpleInt16;
  135. ///
  136. hkUint16 m_simpleUint16;
  137. ///
  138. hkInt32 m_simpleInt32;
  139. ///
  140. hkUint32 m_simpleUint32;
  141. ///
  142. hkInt64 m_simpleInt64;
  143. ///
  144. hkUint64 m_simpleUint64;
  145. ///
  146. hkReal m_simpleReal;
  147. ///
  148. hkVector4 m_simpleVector4;
  149. ///
  150. hkQuaternion m_simpleQuaternion;
  151. ///
  152. hkMatrix3 m_simpleMatrix3;
  153. ///
  154. hkRotation m_simpleRotation;
  155. ///
  156. hkMatrix4 m_simpleMatrix4;
  157. ///
  158. hkTransform m_simpleTransform;
  159. ///
  160. void* m_optionalPtr;
  161. ///
  162. hkEnum<AnEnum, hkInt8> m_simpleEnum;
  163. ///
  164. char* m_name;
  165. ///
  166. char* m_metaSyntacticVariable;
  167. ///
  168. struct SimpleStruct m_simpleStruct;
  169. ///
  170. struct SimpleStruct m_simpleStructCarray[6];
  171. ///
  172. hkBool* m_simpleBoolPointer;
  173. ///
  174. hkChar* m_simpleCharPointer;
  175. ///
  176. hkInt8* m_simpleInt8Pointer;
  177. ///
  178. hkUint8* m_simpleUint8Pointer;
  179. ///
  180. hkInt16* m_simpleInt16Pointer;
  181. ///
  182. hkUint16* m_simpleUint16Pointer;
  183. ///
  184. hkInt32* m_simpleInt32Pointer;
  185. ///
  186. hkUint32* m_simpleUint32Pointer;
  187. ///
  188. hkInt64* m_simpleInt64Pointer;
  189. ///
  190. hkUint64* m_simpleUint64Pointer;
  191. ///
  192. hkReal* m_simpleRealPointer;
  193. ///
  194. hkVector4* m_simpleVector4Pointer;
  195. ///
  196. hkQuaternion* m_simpleQuaternionPointer;
  197. ///
  198. hkMatrix3* m_simpleMatrix3Pointer;
  199. ///
  200. hkRotation* m_simpleRotationPointer;
  201. ///
  202. hkMatrix4* m_simpleMatrix4Pointer;
  203. ///
  204. hkTransform* m_simpleTransformPointer;
  205. ///
  206. hkArray<hkChar> m_arrayCharEmpty;
  207. ///
  208. hkArray<hkInt8> m_arrayInt8Empty;
  209. ///
  210. hkArray<hkUint8> m_arrayUint8Empty;
  211. ///
  212. hkArray<hkInt16> m_arrayInt16Empty;
  213. ///
  214. hkArray<hkUint16> m_arrayUint16Empty;
  215. ///
  216. hkArray<hkInt32> m_arrayInt32Empty;
  217. ///
  218. hkArray<hkUint32> m_arrayUint32Empty;
  219. ///
  220. hkArray<hkInt64> m_arrayInt64Empty;
  221. ///
  222. hkArray<hkUint64> m_arrayUint64Empty;
  223. ///
  224. hkArray<hkReal> m_arrayRealEmpty;
  225. ///
  226. hkArray<hkVector4> m_arrayVector4Empty;
  227. ///
  228. hkArray<hkQuaternion> m_arrayQuaternionEmpty;
  229. ///
  230. hkArray<hkMatrix3> m_arrayMatrix3Empty;
  231. ///
  232. hkArray<hkRotation> m_arrayRotationEmpty;
  233. ///
  234. hkArray<hkMatrix4> m_arrayMatrix4Empty;
  235. ///
  236. hkArray<hkTransform> m_arrayTransformEmpty;
  237. ///
  238. hkArray<hkBool> m_arrayBoolEmpty;
  239. ///
  240. hkArray<hkReal> m_arrayRealWithIntializer;
  241. ///
  242. hkArray<hkVector4> m_arrayVector4WithIntializer;
  243. ///
  244. hkBool m_simpleCarrayBoolEmpty[5];
  245. ///
  246. hkChar m_simpleCarrayCharEmpty[5];
  247. ///
  248. hkInt8 m_simpleCarrayInt8Empty[5];
  249. ///
  250. hkUint8 m_simpleCarrayUint8Empty[5];
  251. ///
  252. hkInt16 m_simpleCarrayInt16Empty[5];
  253. ///
  254. hkUint16 m_simpleCarrayUint16Empty[5];
  255. ///
  256. hkInt32 m_simpleCarrayInt32Empty[5];
  257. ///
  258. hkUint32 m_simpleCarrayUint32Empty[5];
  259. ///
  260. hkInt64 m_simpleCarrayInt64Empty[5];
  261. ///
  262. hkUint64 m_simpleCarrayUint64Empty[5];
  263. ///
  264. hkReal m_simpleCarrayRealEmpty[5];
  265. ///
  266. hkVector4 m_simpleCarrayVector4Empty[5];
  267. ///
  268. hkQuaternion m_simpleCarrayQuaternionEmpty[5];
  269. ///
  270. hkMatrix3 m_simpleCarrayMatrix3Empty[5];
  271. ///
  272. hkRotation m_simpleCarrayRotationEmpty[5];
  273. ///
  274. hkMatrix4 m_simpleCarrayMatrix4Empty[5];
  275. ///
  276. hkTransform m_simpleCarrayTransformEmpty[5];
  277. ///
  278. hkReal m_simpleCarrayRealOneInit[5];
  279. ///
  280. hkReal m_simpleCarrayRealFullInit[5];
  281. ///
  282. hkArray<struct SimpleStruct*> m_arrayStructPtrs;
  283. ///
  284. hkArray<struct SimpleStruct> m_arrayStructEmpty;
  285. ///
  286. struct SimpleStruct m_carrayStructEmpty[5];
  287. ///
  288. struct SimpleStruct m_carrayStructInit[5];
  289. ///
  290. hkInt8* m_simpleArray;
  291. hkInt32 m_numSimpleArray;
  292. ///
  293. hkUint16 m_serializeAsZero;
  294. ///
  295. hkUint16* m_serializePointerAsZero;
  296. ///
  297. hkArray<hkUint16> m_serializeArrayAsZero;
  298. ///
  299. //struct StructWithVtable m_structWithVtable;
  300. ///
  301. struct StructWithArrays m_structWithArrays;
  302. ///
  303. //struct StructWithArrays m_cArrayOfStructsWithArrays[5];
  304. };
  305. #endif // DEMOS_TEST_UNITTEST_HKSERIALIZE_XML_HKSTRESSTESTCINFO_XML_H
  306. /*
  307. * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20090216)
  308. * Confidential Information of Havok.  (C) Copyright 1999-2009
  309. * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
  310. * Logo, and the Havok buzzsaw logo are trademarks of Havok.  Title, ownership
  311. * rights, and intellectual property rights in the Havok software remain in
  312. * Havok and/or its suppliers.
  313. * Use of this software for evaluation purposes is subject to and indicates
  314. * acceptance of the End User licence Agreement for this product. A copy of
  315. * the license is included with this software and is also available at www.havok.com/tryhavok.
  316. */