OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
openjaus::system::Configuration Class Reference

#include <Configuration.h>

Public Member Functions

 Configuration ()
 
virtual ~Configuration ()
 
std::string getFileName () const
 Accessor to get the value of fileName. More...
 
bool setFileName (std::string fileName)
 Accessor to set value of fileName. More...
 
const std::map< std::string, Setting *> & getSettingMap () const
 Accessor to get the value of settingMap. More...
 
bool setSettingMap (std::map< std::string, Setting * > settingMap)
 Accessor to set value of settingMap. More...
 
bool load (std::string fileName)
 Operation load. More...
 
void save ()
 Operation save. More...
 
virtual std::string toString () const
 
template<class Type >
void set (std::string key, Type value, bool controllerWritable=false, bool globalReadable=false, bool controllerReadable=true)
 
template<class Type >
Type value (std::string key, Type defaultValue, bool controllerWritable=false, bool globalReadable=false, bool controllerReadable=true)
 
bool comment (std::string key, std::string comment)
 
bool fileExists ()
 

Protected Member Functions

bool updateFile ()
 
void parseSettings (std::istream &istream, std::map< std::string, Setting * > &settingMap)
 
void settingToStream (std::ostream &ostream, Setting *setting) const
 

Protected Attributes

std::string fileName
 
std::map< std::string, Setting *> settingMap
 

Private Attributes

bool isDirty
 
std::map< std::string, Setting * > originalSettings
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const Configuration &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const Configuration *object)
 

Constructor & Destructor Documentation

§ Configuration()

openjaus::system::Configuration::Configuration ( )

§ ~Configuration()

openjaus::system::Configuration::~Configuration ( )
virtual

Member Function Documentation

§ comment()

bool openjaus::system::Configuration::comment ( std::string  key,
std::string  comment 
)
inline

§ fileExists()

bool openjaus::system::Configuration::fileExists ( )

§ getFileName()

std::string openjaus::system::Configuration::getFileName ( ) const

§ getSettingMap()

const std::map< std::string, Setting *> & openjaus::system::Configuration::getSettingMap ( ) const

§ load()

bool openjaus::system::Configuration::load ( std::string  fileName)
Parameters
fileName

§ parseSettings()

void openjaus::system::Configuration::parseSettings ( std::istream &  istream,
std::map< std::string, Setting * > &  settingMap 
)
protected

§ save()

void openjaus::system::Configuration::save ( )

§ set()

template<class Type >
void openjaus::system::Configuration::set ( std::string  key,
Type  value,
bool  controllerWritable = false,
bool  globalReadable = false,
bool  controllerReadable = true 
)
inline

§ setFileName()

bool openjaus::system::Configuration::setFileName ( std::string  fileName)
Parameters
fileNameThe value of the new fileName.

§ setSettingMap()

bool openjaus::system::Configuration::setSettingMap ( std::map< std::string, Setting * >  settingMap)
Parameters
settingMapThe value of the new settingMap.

§ settingToStream()

void openjaus::system::Configuration::settingToStream ( std::ostream &  ostream,
Setting setting 
) const
protected

§ toString()

std::string openjaus::system::Configuration::toString ( ) const
virtual

§ updateFile()

bool openjaus::system::Configuration::updateFile ( )
protected

§ value()

template<class Type >
Type openjaus::system::Configuration::value ( std::string  key,
Type  defaultValue,
bool  controllerWritable = false,
bool  globalReadable = false,
bool  controllerReadable = true 
)
inline

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const Configuration object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const Configuration object 
)
friend

Member Data Documentation

§ fileName

std::string openjaus::system::Configuration::fileName
protected

§ isDirty

bool openjaus::system::Configuration::isDirty
private

§ originalSettings

std::map<std::string, Setting*> openjaus::system::Configuration::originalSettings
private

§ settingMap

std::map< std::string, Setting * > openjaus::system::Configuration::settingMap
protected

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