AGX Dynamics
2.35.0.1
StaticData.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx 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) \
39
static _Type& _Name() \
40
{ \
41
static _Type s_instance; \
42
return s_instance; \
43
} \
44
static agx::StaticDataInitializer AGX_CONCAT(__agx_static_data_initializer, _Name)(_Name)
45
46
47
namespace
agx
48
{
49
// Only used implicitly via AGX_STATIC_DATA
50
class
StaticDataInitializer
51
{
52
public
:
53
template
<
typename
FuncT>
54
StaticDataInitializer
(FuncT f)
55
{
56
f();
57
}
58
};
59
60
}
61
62
#ifdef _MSC_VER
63
#pragma warning(pop)
64
#endif
65
#endif
/* _AGX_STATICDATA_H_ */
agxCore_export.h
agx.h
agx::StaticDataInitializer
Definition:
StaticData.h:51
agx::StaticDataInitializer::StaticDataInitializer
StaticDataInitializer(FuncT f)
Definition:
StaticData.h:54
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:23
include
agx
StaticData.h
Generated on Fri Jan 20 2023 10:48:19 for AGX Dynamics by
1.9.1