AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxIO::Environment Class Referenceabstract

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

#include <Environment.h>

+ Inheritance diagram for agxIO::Environment:

Public Types

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...
 
enum  Type { RESOURCE_PATH, RUNTIME_PATH, COMPONENT_DEV_PATH, NUM_TYPES }
 Specifies which path to access. More...
 

Public Member Functions

 Environment ()
 Constructor that will initialize the FilePathContainer with data: More...
 
virtual std::string getClassName () const =0
 
agxIO::FilePathContainer & getFilePath (Type t=RESOURCE_PATH)
 
const agxIO::FilePathContainer & getFilePath (Type t=RESOURCE_PATH) const
 
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 ()
 
void shutdown () override
 Implement this method to cleanup your Singleton class. More...
 

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

enum agx::Singleton::Priority
inherited

Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.

Enumerator
HIGHEST_PRIORITY 

The highest priority that can be given to a singleton.

LOWEST_PRIORITY 

The lowest priority that can be given to a singleton.

DEFAULT_PRIORITY 

The default priority given to a singleton.

Definition at line 35 of file Singleton.h.

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

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

void agx::Singleton::_shutdown ( )
protectedinherited
virtual std::string agx::Singleton::getClassName ( ) const
pure virtualinherited
agxIO::FilePathContainer& agxIO::Environment::getFilePath ( Type  t = RESOURCE_PATH)
Returns
reference to the FilePathContainer for finding files given the current setup filepath:s.
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.
int agx::Singleton::getPriority ( ) const
inherited

Return the shutdown priority of the singleton instance.

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

Implement this method to cleanup your Singleton class.

Reimplemented from agx::Singleton.

Member Data Documentation

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

Definition at line 95 of file Environment.h.

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: