Main MRPT website > C++ reference
MRPT logo

mrpt::utils::CConfigFileMemory Class Reference

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

#include <mrpt/utils/CConfigFileMemory.h>

Inheritance diagram for mrpt::utils::CConfigFileMemory:
Inheritance graph
[legend]
Collaboration diagram for mrpt::utils::CConfigFileMemory:
Collaboration 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".
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.

Detailed Description

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

Definition at line 45 of file CConfigFileMemory.h.


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.

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 std::string &  str  ) 

Changes the contents of the virtual "config file".

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

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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010