PageRenderTime 1667ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Havok/Source/Common/Base/hkBase.h

https://bitbucket.org/diamondcore/diamondcore-engine
C Header | 130 lines | 60 code | 23 blank | 47 comment | 1 complexity | 2e5d1483afdb8e77fac6b0770218f669 MD5 | raw file
  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. * Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2012 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 HKBASE_HKBASE_H
  9. #define HKBASE_HKBASE_H
  10. #include <Common/Base/Types/hkBaseTypes.h>
  11. #if defined HK_COMPILER_MSVC
  12. // C4100 'identifier' : unreferenced formal parameter
  13. // a function need not use all its arguments
  14. // C4127 conditional expression is constant
  15. // constant conditionals are often used inside asserts
  16. // C4505 'function' : unreferenced local function has been removed
  17. // lots of inline functions are not used in a compilation unit
  18. // C4510 'class' : default constructor could not be generated
  19. // C4511 'class' : copy constructor could not be generated
  20. // C4512 'class' : assignment operator could not be generated
  21. // many classes are not designed with value semantics
  22. // C4514 unreferenced inline/local function has been removed
  23. // lots of inline functions are not used in a compilation unit
  24. // C4714 force inlined function not inlined. This warning is only disabled in debug modes.
  25. // C4481: nonstandard extension used: override specifier 'override'
  26. // disable warning if we're using HK_OVERRIDE
  27. # pragma warning(push)
  28. # pragma warning(disable: 4100 4127 4324 4505 4510 4511 4512 4514)
  29. //# pragma warning(disable: 1684 981 1419 1418 271 1572 128 ) // Intel compiler warnings
  30. # if defined(HK_DEBUG)
  31. # pragma warning(disable: 4714)
  32. # endif
  33. #if (_MSC_VER >= 1400)
  34. # pragma warning(disable: 4481)
  35. #endif
  36. # ifndef _CRT_SECURE_NO_DEPRECATE
  37. # define _CRT_SECURE_NO_DEPRECATE 1
  38. # endif
  39. # ifndef _CRT_NONSTDC_NO_DEPRECATE
  40. # define _CRT_NONSTDC_NO_DEPRECATE 1
  41. # endif
  42. #elif defined(HK_COMPILER_GHS)
  43. # pragma ghs nowarning 1721 // var shadows function. y0 etc delc as functions in no namespace in ghs math.h !?
  44. # pragma ghs nowarning 381 // extra ;
  45. # pragma ghs nowarning 826 // unused param
  46. # pragma ghs nowarning 236 // constant control var
  47. # pragma ghs nowarning 1931 // sizeof a builtin bool etc
  48. # pragma ghs nowarning 1795 // __ in name may be not debuggable
  49. # pragma ghs nowarning 111 // unreachable statement
  50. # pragma ghs nowarning 177 // func declared but never referenced
  51. # pragma ghs nowarning 1518 // ansi alaising rules being turned off..
  52. # pragma ghs nowarning 1586 // force noinline on what the compiler thinks is inline warns a lot (on templated classes it seems)
  53. #elif defined HK_COMPILER_ARMCC
  54. // By default ARMCC is very picky with its warnings
  55. // 826 = unused var, in Havok when we inherit we always use full arg list, but can ignore it
  56. // 1297, 1298= Header file not guarded against multiple inclusion, and it interprets .inl files as include files etc which do not need them. 1298 is that what looks like header file guard is not defined, which can happen for non TKBMS headers for PlayStation(R)3 SPU etc
  57. // 1301, 253, 2530: padding added to struct Blah. A good few structs in Havok have implicit, known, padding
  58. // 399,831 : no delete[] for a new[], yet it is a placement new[] that is at fault, and placement delete[] raises a further warning. Placement delete[] will never be called.
  59. // 2525 : pragma push with no pop: this is as intended. If clients want to restore settings after incl Havok they can pop, otherwise leave as is
  60. // 340 : 'value copied to temporary, reference to temporary used'. Gets triggered by most uses of unions to do type conversion etc, so all false positives in Havok code
  61. // 401 : non virtual dtor in parent. This will be cleaned up
  62. // 2523 : use of inline assembler is deprecated (from nn headers, not Havoks)
  63. # pragma push
  64. # pragma diag_suppress 826,1297,1298,1301,253,2530,399,831,2525,401,340,2523
  65. # ifndef HK_DEBUG
  66. // 2814 : empty else statement. Should be cleaned up, but all from HK_ASSERT(0x5545d218) style else blocks
  67. # pragma diag_suppress 2814
  68. # endif
  69. #endif
  70. #include <Common/Base/Memory/MemoryClasses/hkMemoryClassDefinitions.h>
  71. #include <Common/Base/Memory/Router/hkMemoryRouter.h>
  72. #include <Common/Base/Object/hkBaseObject.h>
  73. #include <Common/Base/Object/hkReferencedObject.h>
  74. #include <Common/Base/Object/hkSingleton.h>
  75. #include <Common/Base/System/Io/OStream/hkOStream.h> /* <todo> remove */
  76. #include <Common/Base/System/Error/hkError.h>
  77. #include <Common/Base/Types/hkRefPtr.h>
  78. #include <Common/Base/Types/hkScopedPtr.h>
  79. struct hkPlacementNewArg;
  80. inline void* operator new(hk_size_t, hkPlacementNewArg* p) { return p; }
  81. inline void* operator new[](hk_size_t, hkPlacementNewArg* p) { return p; }
  82. inline void operator delete(void* /*unused*/, hkPlacementNewArg* /*unused*/) { HK_ASSERT(0x5c4071a3, false); }
  83. inline void operator delete[](void* /*unused*/, hkPlacementNewArg* /*unused*/) { HK_ASSERT(0x7ca45d11, false); }
  84. #include <Common/Base/Types/hkTypeTraits.h>
  85. #include <Common/Base/Memory/Util/hkMemUtil.h>
  86. #include <Common/Base/Container/Array/hkArray.h>
  87. #include <Common/Base/Container/Array/hkSmallArray.h>
  88. #include <Common/Base/Container/PointerMap/hkPointerMap.h>
  89. #include <Common/Base/Types/hkRefVariant.h>
  90. #include <Common/Base/Math/hkMath.h>
  91. #include <Common/Base/Container/String/hkString.h>
  92. #include <Common/Base/Container/String/hkStringPtr.h>
  93. #endif // HKBASE_HKBASE_H
  94. /*
  95. * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20120831)
  96. *
  97. * Confidential Information of Havok. (C) Copyright 1999-2012
  98. * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok
  99. * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership
  100. * rights, and intellectual property rights in the Havok software remain in
  101. * Havok and/or its suppliers.
  102. *
  103. * Use of this software for evaluation purposes is subject to and indicates
  104. * acceptance of the End User licence Agreement for this product. A copy of
  105. * the license is included with this software and is also available at www.havok.com/tryhavok.
  106. *
  107. */