AGXDynamics  2.35.0.3
ConfigSingleton.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_CONFIGSINGLETON_H
18 #define AGX_CONFIGSINGLETON_H
19 
20 
21 #include <agx/agxPhysics_export.h>
22 #include <agx/Singleton.h>
23 #include <agxCFG/ConfigScript.h>
24 
25 #ifdef _MSC_VER
26 # pragma warning(push)
27 # pragma warning( disable : 4251 ) // class X needs to have dll-interface to be used by clients of class Y
28 #endif
29 
30 namespace agx
31 {
32 
35  {
36  public:
37  static void loadDefaultConfiguration();
38 
39  public:
40 
43 
48  static agxCFG::ConfigScript* settings( void );
49 
51  static agxCFG::ConfigScript* cfg( void );
52 
53  SINGLETON_CLASSNAME_METHOD();
54 
55  protected:
56  void shutdown() override;
57 
58  agxCFG::ConfigScript* getSettingsCFG();
59 
60  agxCFG::ConfigScript* getDefaultCFG();
61 
62  private:
65 
66  virtual ~ConfigSingleton();
67  static ConfigSingleton* s_instance;
68 
69  };
70 }
71 
72 #ifdef _MSC_VER
73 # pragma warning(pop)
74 #endif
75 
76 #endif
agxPhysics_export.h
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::ref_ptr< agxCFG::ConfigScript >
agx::shutdown
void AGXPHYSICS_EXPORT shutdown()
Shutdown agx.
agx::Singleton
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Definition: Singleton.h:30
agx::ConfigSingleton
Class for holding a reference to the Config db for the core settings defined in the file "settings....
Definition: ConfigSingleton.h:34
Singleton.h