Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
orxonox::ConfigurablePaths Class Reference

The ConfigurablePaths class is a singleton used to configure different paths. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/ConfigurablePaths.h>

Inheritance diagram for orxonox::ConfigurablePaths:
orxonox::Singleton< ConfigurablePaths >

Public Member Functions

 ConfigurablePaths ()
 
 ~ConfigurablePaths ()
 
void setConfigurablePaths (const ApplicationPaths &applicationPaths)
 Sets config, log and media path and creates the folders if necessary. More...
 

Static Public Member Functions

static const boost::filesystem::pathgetConfigPath ()
 Returns the path to the config files as boost::filesystem::path. More...
 
static std::string getConfigPathString ()
 Returns the path to the config files as std::string. More...
 
static const boost::filesystem::pathgetDataPath ()
 Returns the path to the data files as boost::filesystem::path. More...
 
static std::string getDataPathString ()
 Returns the path to the data files as std::string. More...
 
static const boost::filesystem::pathgetExternalDataPath ()
 Returns the path to the external data files as boost::filesystem::path. More...
 
static std::string getExternalDataPathString ()
 Returns the path to the external data files as std::string. More...
 
static const boost::filesystem::pathgetLogPath ()
 Returns the path to the log files as boost::filesystem::path. More...
 
static std::string getLogPathString ()
 Returns the path to the log files as std::string. More...
 
- Static Public Member Functions inherited from orxonox::Singleton< ConfigurablePaths >
static bool exists ()
 Tells whether the singleton has been created. More...
 
static ConfigurablePathsgetInstance ()
 Returns a reference to the singleton instance. More...
 

Private Member Functions

 ConfigurablePaths (const ConfigurablePaths &)=delete
 
ConfigurablePathsoperator= (const ConfigurablePaths &)=delete
 

Private Attributes

boost::filesystem::pathconfigPath_
 Path to the config files folder. More...
 
boost::filesystem::pathdataPath_
 Path to the data files folder. More...
 
boost::filesystem::pathexternalDataPath_
 Path to the external data files folder. More...
 
boost::filesystem::pathlogPath_
 Path to the log files folder. More...
 

Static Private Attributes

static ConfigurablePathssingletonPtr_s = nullptr
 Static pointer to the singleton. More...
 

Friends

class Singleton< ConfigurablePaths >
 

Additional Inherited Members

- Protected Member Functions inherited from orxonox::Singleton< ConfigurablePaths >
 Singleton ()
 Constructor sets the singleton instance pointer. More...
 
virtual ~Singleton ()
 Destructor resets the singleton instance pointer. More...
 

Detailed Description

The ConfigurablePaths class is a singleton used to configure different paths.

The class provides information about the data, config, and log path.

Remarks
Not all paths are always available:
  • externalData only for development builds in the build tree

Constructor & Destructor Documentation

orxonox::ConfigurablePaths::ConfigurablePaths ( )
orxonox::ConfigurablePaths::~ConfigurablePaths ( )
orxonox::ConfigurablePaths::ConfigurablePaths ( const ConfigurablePaths )
privatedelete

Member Function Documentation

static const boost::filesystem::path& orxonox::ConfigurablePaths::getConfigPath ( )
inlinestatic

Returns the path to the config files as boost::filesystem::path.

std::string orxonox::ConfigurablePaths::getConfigPathString ( )
static

Returns the path to the config files as std::string.

static const boost::filesystem::path& orxonox::ConfigurablePaths::getDataPath ( )
inlinestatic

Returns the path to the data files as boost::filesystem::path.

std::string orxonox::ConfigurablePaths::getDataPathString ( )
static

Returns the path to the data files as std::string.

static const boost::filesystem::path& orxonox::ConfigurablePaths::getExternalDataPath ( )
inlinestatic

Returns the path to the external data files as boost::filesystem::path.

std::string orxonox::ConfigurablePaths::getExternalDataPathString ( )
static

Returns the path to the external data files as std::string.

static const boost::filesystem::path& orxonox::ConfigurablePaths::getLogPath ( )
inlinestatic

Returns the path to the log files as boost::filesystem::path.

std::string orxonox::ConfigurablePaths::getLogPathString ( )
static

Returns the path to the log files as std::string.

ConfigurablePaths& orxonox::ConfigurablePaths::operator= ( const ConfigurablePaths )
privatedelete
void orxonox::ConfigurablePaths::setConfigurablePaths ( const ApplicationPaths applicationPaths)

Sets config, log and media path and creates the folders if necessary.

Exceptions
GeneralException

Friends And Related Function Documentation

friend class Singleton< ConfigurablePaths >
friend

Member Data Documentation

boost::filesystem::path& orxonox::ConfigurablePaths::configPath_
private

Path to the config files folder.

boost::filesystem::path& orxonox::ConfigurablePaths::dataPath_
private

Path to the data files folder.

boost::filesystem::path& orxonox::ConfigurablePaths::externalDataPath_
private

Path to the external data files folder.

boost::filesystem::path& orxonox::ConfigurablePaths::logPath_
private

Path to the log files folder.

ConfigurablePaths * orxonox::ConfigurablePaths::singletonPtr_s = nullptr
staticprivate

Static pointer to the singleton.


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