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

其他游戏

开发平台:

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 HK_SERIALIZE_COPIER_DEEP_COPIER_H
  9. #define HK_SERIALIZE_COPIER_DEEP_COPIER_H
  10. #include <Common/Serialize/Copier/hkObjectCopier.h>
  11. template <typename K, typename V> class hkPointerMap;
  12. class hkVtableClassRegistry;
  13. class hkTypeInfoRegistry;
  14. /// Utility to copy an object and all pointed objects.
  15. namespace hkDeepCopier
  16. {
  17. /// Source To 
  18. typedef hkPointerMap<const void*, void*> CopyFromOriginal;
  19. /// Copy an object and all pointed objects.
  20. /// Copied objects are flattened into a single allocation
  21. /// like a headerless packfile.
  22. /// If copyFromOriginal is not null, it is checked for previously copied objects
  23. /// and deep copying uses these objects instead of recursing. Newly
  24. /// copied objects are also written into it on completion.
  25. /// If vtableClassRegistry is not HK_NULL, it will be used to find out
  26. /// the derived class of the objects being copied.  It is required
  27. /// if you are copying polymorphic objects.  If you want the objects
  28. /// to be "finished" (setting their vtables, etc), you must also supply
  29. /// a non-null finishLoadedObjectRegistry.
  30. void* HK_CALL deepCopy( const void* dataIn, 
  31. const hkClass& klassIn, 
  32. CopyFromOriginal* copyFromOriginal, 
  33. hkVtableClassRegistry* vtableClassRegistry = HK_NULL,
  34. hkTypeInfoRegistry* loadedObjectRegistry = HK_NULL,
  35. hkObjectCopier::ObjectCopierFlags flags = hkObjectCopier::FLAG_NONE );
  36. }
  37. #endif //HK_SERIALIZE_COPIER_DEEP_COPIER_H
  38. /*
  39. * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20090216)
  40. * Confidential Information of Havok.  (C) Copyright 1999-2009
  41. * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
  42. * Logo, and the Havok buzzsaw logo are trademarks of Havok.  Title, ownership
  43. * rights, and intellectual property rights in the Havok software remain in
  44. * Havok and/or its suppliers.
  45. * Use of this software for evaluation purposes is subject to and indicates
  46. * acceptance of the End User licence Agreement for this product. A copy of
  47. * the license is included with this software and is also available at www.havok.com/tryhavok.
  48. */