AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxIO/Environment.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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#pragma once
18
19#include <agx/agxCore_export.h>
21#include <agx/Singleton.h>
22
23namespace agxIO
24{
42 {
43 public:
44
46 enum Type {
51 NUM_TYPES
52 };
53
61
63 static Environment* instance( void );
64
69
73 const agxIO::FilePathContainer& getFilePath( Type t = RESOURCE_PATH ) const;
74
76
77
78 agx::String findComponent(const agx::String& path) const;
79
85 bool setupFromRegistry();
86
87 SINGLETON_CLASSNAME_METHOD();
89
90
91 protected:
92 void shutdown() override;
93
94 agxIO::FilePathContainer m_filePathContainer[NUM_TYPES];
95 static Environment* s_instance;
96 };
97
99#define AGX_ENVIRONMENT() (*agxIO::Environment::instance())
100}
101
#define AGXCORE_EXPORT
Class for setting search path for locating dynamic libraries, scripts etc.
Environment()
Constructor that will initialize the FilePathContainer with data:
agxIO::FilePathContainer & getFilePath(Type t=RESOURCE_PATH)
Type
Specifies which path to access.
@ COMPONENT_DEV_PATH
Specifies paths for where to search for component definitions and source code (only for developers)
@ RUNTIME_PATH
Specifies paths for where to search for plugin's/runtime libraries.
@ RESOURCE_PATH
Specifies paths for where to search for resource files such as scripts, images, models etc.
const agxIO::FilePathContainer & getFilePath(Type t=RESOURCE_PATH) const
static Environment * instance(void)
class for locating files
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Definition: Singleton.h:31
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:42
The agx namespace contains the dynamics/math part of the AGX Dynamics API.