AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
StaticData.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGX_STATICDATA_H
18#define AGX_STATICDATA_H
19
20#include <agx/agx.h>
21#include <agx/agxCore_export.h>
22
23#ifdef _MSC_VER
24# pragma warning(push)
25# pragma warning(disable: 4505) // warning C4505: 'X' : unreferenced local function has been removed
26#endif
27
38#define AGX_STATIC_DATA(_Name, _Type) \
39static _Type& _Name() \
40{ \
41 static _Type s_instance; \
42 return s_instance; \
43} \
44static agx::StaticDataInitializer AGX_CONCAT(__agx_static_data_initializer, _Name)(_Name)
45
46
47namespace agx
48{
49 // Only used implicitly via AGX_STATIC_DATA
51 {
52 public:
53 template <typename FuncT>
55 {
56 f();
57 }
58 };
59
60}
61
62#ifdef _MSC_VER
63 #pragma warning(pop)
64#endif
65#endif /* _AGX_STATICDATA_H_ */
The agx namespace contains the dynamics/math part of the AGX Dynamics API.