AGX Dynamics  2.37.2.0
Environment.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 AGXIO_ENVIRONMENT_H
18 #define AGXIO_ENVIRONMENT_H
19 
20 #include <agx/agxCore_export.h>
22 #include <agx/Singleton.h>
23 
24 namespace agxIO
25 {
43  {
44  public:
45 
47  enum Type {
52  NUM_TYPES
53  };
54 
61  Environment( );
62 
64  static Environment* instance( void );
65 
69  agxIO::FilePathContainer& getFilePath( Type t = RESOURCE_PATH );
70 
74  const agxIO::FilePathContainer& getFilePath( Type t = RESOURCE_PATH ) const;
75 
77 
78 
79  agx::String findComponent(const agx::String& path) const;
80 
86  bool setupFromRegistry();
87 
88  SINGLETON_CLASSNAME_METHOD();
90 
91 
92  protected:
93  void shutdown() override;
94 
95  agxIO::FilePathContainer m_filePathContainer[NUM_TYPES];
96  static Environment* s_instance;
97  };
98 
100 #define AGX_ENVIRONMENT() (*agxIO::Environment::instance())
101 }
102 
103 #endif
104 
void AGXPHYSICS_EXPORT shutdown()
Shutdown of the AGX Dynamics API will be done when the number of shutdown matches the number of calls...
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:41
Specifies paths for where to search for component definitions and source code (only for developers) ...
Definition: Environment.h:50
AgXString< std::string > String
Definition: String.h:427
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Specifies paths for where to search for resource files such as scripts, images, models etc...
Definition: Environment.h:48
Type
Specifies which path to access.
Definition: Environment.h:47
class for locating files
Class for setting search path for locating dynamic libraries, scripts etc.
Definition: Environment.h:42
Specifies paths for where to search for plugin&#39;s/runtime libraries.
Definition: Environment.h:49
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define AGXCORE_EXPORT
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Definition: Singleton.h:30