Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Member Functions | Private Attributes

mrpt::utils::CConfigFileMemory Class Reference


Detailed Description

This class implements a config file-like interface over a memory-stored string list.

Definition at line 45 of file CConfigFileMemory.h.

#include <mrpt/utils/CConfigFileMemory.h>

Inheritance diagram for mrpt::utils::CConfigFileMemory:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CConfigFileMemory (const utils::CStringList &stringList)
 Constructor and initialize from a list of strings.
 CConfigFileMemory (const std::string &str)
 Constructor and initialize from string with the whole "config file".
 CConfigFileMemory ()
 Empty constructor.
 CConfigFileMemory (const CConfigFileMemory &o)
 Copy constructor.
CConfigFileMemoryoperator= (const CConfigFileMemory &o)
 Copy operator.
void setContent (const utils::CStringList &stringList)
 Changes the contents of the virtual "config file".
void setContent (const std::string &str)
 Changes the contents of the virtual "config file".
void getContent (std::string &str) const
 Return the currnet contents of the virtual "config file".
std::string getContent () const
 Return the currnet contents of the virtual "config file".
virtual ~CConfigFileMemory ()
 Destructor.
virtual void getAllSections (vector_string &sections) const
 Returns a list with all the section names.
virtual void getAllKeys (const std::string section, vector_string &keys) const
 Returs a list with all the keys into a section.

Protected Member Functions

void writeString (const std::string &section, const std::string &name, const std::string &str)
 A virtual method to write a generic string.
std::string readString (const std::string &section, const std::string &name, const std::string &defaultStr, bool failIfNotFound=false) const
 A virtual method to read a generic string.

Private Attributes

void_ptr_noncopy m_ini
 The IniFile object.

Constructor & Destructor Documentation

mrpt::utils::CConfigFileMemory::CConfigFileMemory ( const utils::CStringList stringList)

Constructor and initialize from a list of strings.

mrpt::utils::CConfigFileMemory::CConfigFileMemory ( const std::string &  str)

Constructor and initialize from string with the whole "config file".

mrpt::utils::CConfigFileMemory::CConfigFileMemory ( )

Empty constructor.

Upon construction, call any of the "setContent" method.

mrpt::utils::CConfigFileMemory::CConfigFileMemory ( const CConfigFileMemory o)

Copy constructor.

virtual mrpt::utils::CConfigFileMemory::~CConfigFileMemory ( ) [virtual]

Destructor.


Member Function Documentation

virtual void mrpt::utils::CConfigFileMemory::getAllKeys ( const std::string  section,
vector_string keys 
) const [virtual]

Returs a list with all the keys into a section.

Implements mrpt::utils::CConfigFileBase.

virtual void mrpt::utils::CConfigFileMemory::getAllSections ( vector_string sections) const [virtual]

Returns a list with all the section names.

Implements mrpt::utils::CConfigFileBase.

void mrpt::utils::CConfigFileMemory::getContent ( std::string &  str) const

Return the currnet contents of the virtual "config file".

Referenced by mrpt::utils::TCamera::dumpAsText().

std::string mrpt::utils::CConfigFileMemory::getContent ( ) const [inline]

Return the currnet contents of the virtual "config file".

Definition at line 91 of file CConfigFileMemory.h.

References getContent().

Referenced by getContent().

CConfigFileMemory& mrpt::utils::CConfigFileMemory::operator= ( const CConfigFileMemory o)

Copy operator.

std::string mrpt::utils::CConfigFileMemory::readString ( const std::string &  section,
const std::string &  name,
const std::string &  defaultStr,
bool  failIfNotFound = false 
) const [protected, virtual]

A virtual method to read a generic string.

Implements mrpt::utils::CConfigFileBase.

void mrpt::utils::CConfigFileMemory::setContent ( const utils::CStringList stringList)

Changes the contents of the virtual "config file".

void mrpt::utils::CConfigFileMemory::setContent ( const std::string &  str)

Changes the contents of the virtual "config file".

void mrpt::utils::CConfigFileMemory::writeString ( const std::string &  section,
const std::string &  name,
const std::string &  str 
) [protected, virtual]

A virtual method to write a generic string.

Implements mrpt::utils::CConfigFileBase.


Member Data Documentation

The IniFile object.

Definition at line 50 of file CConfigFileMemory.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011