AGX Dynamics  2.37.3.2
agxIO::Environment Class Reference

Class for setting search path for locating dynamic libraries, scripts etc. More...

#include <Environment.h>

+ Inheritance diagram for agxIO::Environment:

Public Types

enum  Type { RESOURCE_PATH, RUNTIME_PATH, COMPONENT_DEV_PATH, NUM_TYPES }
 Specifies which path to access. More...
 
- Public Types inherited from agx::Singleton
enum  Priority { HIGHEST_PRIORITY = 2147483647, LOWEST_PRIORITY = 10000, DEFAULT_PRIORITY = 1073741824 }
 Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More...
 

Public Member Functions

 Environment ()
 Constructor that will initialize the FilePathContainer with data: More...
 
agxIO::FilePathContainer & getFilePath (Type t=RESOURCE_PATH)
 
const agxIO::FilePathContainer & getFilePath (Type t=RESOURCE_PATH) const
 
- Public Member Functions inherited from agx::Singleton
 Singleton (int priority=DEFAULT_PRIORITY)
 Default constructor. More...
 
virtual std::string getClassName () const =0
 
int getPriority () const
 Return the shutdown priority of the singleton instance. More...
 

Static Public Member Functions

static Environment * instance (void)
 

Protected Member Functions

void shutdown () override
 Implement this method to cleanup your Singleton class. More...
 
- Protected Member Functions inherited from agx::Singleton
virtual ~Singleton ()
 Destructor. More...
 
void _shutdown ()
 

Protected Attributes

agxIO::FilePathContainer m_filePathContainer [NUM_TYPES]
 

Static Protected Attributes

static Environment * s_instance
 

Detailed Description

Class for setting search path for locating dynamic libraries, scripts etc.

Environment has three paths, of which user should use: RESOURCE_PATH and RUNTIME_PATH

RESOURCE_PATH - lists directories where AGX can find license files, kernel files, configuration files and scripts. BINARY_PATH - lists directories where AGX should search for collider plugins, kernel binaries etc.

// Tell AGX where to find some additional scripts.
// Point out where to find plugins

Definition at line 42 of file Environment.h.

Member Enumeration Documentation

◆ Type

Specifies which path to access.

Enumerator
RESOURCE_PATH 

Specifies paths for where to search for resource files such as scripts, images, models etc.

RUNTIME_PATH 

Specifies paths for where to search for plugin's/runtime libraries.

COMPONENT_DEV_PATH 

Specifies paths for where to search for component definitions and source code (only for developers)

NUM_TYPES 

Definition at line 47 of file Environment.h.

Constructor & Destructor Documentation

◆ Environment()

agxIO::Environment::Environment ( )

Constructor that will initialize the FilePathContainer with data:

RESOURCE_PATH: Paths from the environment variable AGX_FILE_PATH RUNTIME_PATH: Paths from the environment variable PATH/LD_LIBRARY_PATH

Member Function Documentation

◆ getFilePath() [1/2]

agxIO::FilePathContainer& agxIO::Environment::getFilePath ( Type  t = RESOURCE_PATH)
Returns
reference to the FilePathContainer for finding files given the current setup filepath:s.

◆ getFilePath() [2/2]

const agxIO::FilePathContainer& agxIO::Environment::getFilePath ( Type  t = RESOURCE_PATH) const
Returns
a const reference to the FilePathContainer for finding files given the current setup filepath:s.

◆ instance()

static Environment* agxIO::Environment::instance ( void  )
static
Returns
a pointer to the Environment singleton.

◆ shutdown()

void agxIO::Environment::shutdown ( )
overrideprotectedvirtual

Implement this method to cleanup your Singleton class.

Reimplemented from agx::Singleton.

Member Data Documentation

◆ m_filePathContainer

agxIO::FilePathContainer agxIO::Environment::m_filePathContainer[NUM_TYPES]
protected

Definition at line 95 of file Environment.h.

◆ s_instance

Environment* agxIO::Environment::s_instance
staticprotected

Definition at line 96 of file Environment.h.


The documentation for this class was generated from the following file: