All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Public Member Functions | Private Member Functions | Private Attributes
face_contour_detector::Properties Class Reference

Allows to open, modify and save a properties file (which stores key/value pairs) More...

#include <Properties.h>

List of all members.

Public Member Functions

void AppendSaveToStream (std::ostream &s)
void Clear ()
 Deletes all key value pairs.
bool Exists (const std::string &key) const
void LoadFromStream (std::istream &s)
void LoadFromStreamNoOverwrite (std::istream &s, std::stringstream &notReadable)
void LoadFromTxtFile (const std::string &file)
 Properties ()
 Standard constructor.
 Properties (const Properties &other)
bool ReadBool (const std::string &key) const
double ReadDouble (const std::string &key) const
float ReadFloat (const std::string &key) const
int ReadInt (const std::string &key) const
std::string ReadString (const std::string &key) const
void SaveToTxtFile (const std::string &file)
void Set (const std::string &key, const std::string &value)
void Set (const std::string &key, const char *value)
void Set (const std::string &key, int value)
void Set (const std::string &key, float value)
void Set (const std::string &key, double value)
void Set (const std::string &key, bool value)

Private Member Functions

std::string & M_Replace (std::string &s, const std::string &sub, const std::string &other)

Private Attributes

std::map< std::string,
std::string > 
m_m

Detailed Description

Allows to open, modify and save a properties file (which stores key/value pairs)

Definition at line 13 of file Properties.h.


Constructor & Destructor Documentation

Standard constructor.

Definition at line 13 of file Properties.cpp.

Copy constructor

Parameters:
other

Definition at line 15 of file Properties.cpp.


Member Function Documentation

Definition at line 185 of file Properties.cpp.

Deletes all key value pairs.

Definition at line 247 of file Properties.cpp.

Returns if a value exists for the given key

Parameters:
keythe key
Returns:
true if the

Definition at line 199 of file Properties.cpp.

Loads properties from a stream. (Warining: This will overwrite already present properties with the same key)

Parameters:
sthe stream from where there is going to be parsed

parse

Definition at line 29 of file Properties.cpp.

void face_contour_detector::Properties::LoadFromStreamNoOverwrite ( std::istream &  s,
std::stringstream &  notReadable 
)

Parses the properties present in the stream, but only set's they don't already exist in this object.

Parameters:
sthe contents of this stream will be parsed
notReadablelines that could not be parsed will be put intp the notReadable stream

parse

Definition at line 90 of file Properties.cpp.

Loads properties from a text file (ASCII Encoding). (Warining: This will overwrite already present properties with the same key)

Parameters:
filepath to the file

Definition at line 17 of file Properties.cpp.

std::string & face_contour_detector::Properties::M_Replace ( std::string &  s,
const std::string &  sub,
const std::string &  other 
) [inline, private]

Definition at line 109 of file Properties.h.

Reads a value as a bool

Parameters:
keythe key
Returns:
the value parsed as a bool

Definition at line 209 of file Properties.cpp.

double face_contour_detector::Properties::ReadDouble ( const std::string &  key) const

Reads a value as a double

Parameters:
keythe key
Returns:
the value parsed as a float

Definition at line 205 of file Properties.cpp.

Reads a value as a float

Parameters:
keythe key
Returns:
the value parsed as a float

Definition at line 203 of file Properties.cpp.

int face_contour_detector::Properties::ReadInt ( const std::string &  key) const

Reads a value as a int

Parameters:
keythe key
Returns:
the value parsed as a int

Definition at line 207 of file Properties.cpp.

std::string face_contour_detector::Properties::ReadString ( const std::string &  key) const

Reads a value as a string

Parameters:
keythe key
Returns:
the value parsed as a string

Definition at line 201 of file Properties.cpp.

Saves the content of the properties into a text file (ASCII Encoded). Also not yet loaded properties, that are defined in the file, will be loaded.

Parameters:
filepath to the file

Definition at line 149 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
const std::string &  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 217 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
const char *  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 221 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
int  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 225 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
float  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 231 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
double  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 237 of file Properties.cpp.

void face_contour_detector::Properties::Set ( const std::string &  key,
bool  value 
)

Sets the key to the given value

Parameters:
keythe key
valuethe value

Definition at line 243 of file Properties.cpp.


Member Data Documentation

std::map<std::string, std::string> face_contour_detector::Properties::m_m [private]

Definition at line 102 of file Properties.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


face_contour_detector
Author(s): Fabian Wenzelmann and Julian Schmid
autogenerated on Wed Dec 26 2012 16:18:17