OpenJAUS SAE SDK  6.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
openjaus::system::UserConfiguration Class Reference

#include <UserConfiguration.h>

Public Member Functions

 UserConfiguration ()
 
virtual ~UserConfiguration ()
 
std::string getFileName () const
 Accessor to get the value of fileName. More...
 
bool setFileName (std::string fileName)
 Accessor to set value of fileName. More...
 
bool load (std::string fileName)
 Operation load. More...
 
const std::map< std::string, Setting *> & getSettingMap () const
 Accessor to get the value of settingMap. More...
 
virtual std::string toString () const
 
template<class Type >
void set (const std::string &key, Type value)
 
template<class Type >
Type get (const std::string &key, Type defaultValue)
 
template<class Type >
bool tryGet (const std::string &key, Type &value)
 
bool comment (const std::string &key, std::string comment)
 
bool fileExists ()
 

Protected Member Functions

bool 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
 
std::map< std::string, Setting *> originalSettings
 
bool isDirty
 

Friends

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

Constructor & Destructor Documentation

◆ UserConfiguration()

openjaus::system::UserConfiguration::UserConfiguration ( )

◆ ~UserConfiguration()

openjaus::system::UserConfiguration::~UserConfiguration ( )
virtual

Member Function Documentation

◆ comment()

bool openjaus::system::UserConfiguration::comment ( const std::string &  key,
std::string  comment 
)
inline

◆ fileExists()

bool openjaus::system::UserConfiguration::fileExists ( )

◆ get()

template<class Type >
Type openjaus::system::UserConfiguration::get ( const std::string &  key,
Type  defaultValue 
)
inline

◆ getFileName()

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

◆ getSettingMap()

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

◆ load()

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

◆ parseSettings()

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

◆ set()

template<class Type >
void openjaus::system::UserConfiguration::set ( const std::string &  key,
Type  value 
)
inline

◆ setFileName()

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

◆ settingToStream()

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

◆ toString()

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

◆ tryGet()

template<class Type >
bool openjaus::system::UserConfiguration::tryGet ( const std::string &  key,
Type &  value 
)
inline

Friends And Related Function Documentation

◆ operator<< [1/2]

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

◆ operator<< [2/2]

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

Member Data Documentation

◆ fileName

std::string openjaus::system::UserConfiguration::fileName
protected

◆ isDirty

bool openjaus::system::UserConfiguration::isDirty
protected

◆ originalSettings

std::map< std::string, Setting * > openjaus::system::UserConfiguration::originalSettings
protected

◆ settingMap

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

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