Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
ConfigFileReader Class Reference

#include <mitkConfigFileReader.h>

Collaboration diagram for ConfigFileReader:

Public Member Functions

 ConfigFileReader (std::string const &configFile)
 
void ReadFile (std::string const &filePath)
 
void ReadStream (std::istream &stream)
 
std::string Value (std::string const &section, std::string const &entry) const
 
std::string Value (const std::string &section, const std::string &entry, const std::string &standard)
 
int IntValue (const std::string &section, const std::string &entry) const
 
int IntValue (const std::string &section, const std::string &entry, int standard)
 
std::vector< std::string > Vector (std::string const &section, unsigned int index) const
 
unsigned int ListSize (std::string const &section) const
 
unsigned int ListSize (std::string const &section, unsigned int standard)
 

Protected Types

typedef std::map< std::string, std::string > ContentType
 
typedef std::map< std::string, std::vector< std::string > > ListContentType
 

Protected Member Functions

std::string Trim (std::string const &source, char const *delim=" \t\r\n")
 
std::string RemoveComment (std::string const &source, char const *delim="#;")
 
std::string ListIndex (std::string const &section, unsigned int index) const
 
std::string ContentIndex (std::string const &section, std::string const &entry) const
 
std::string ListSizeIndex (std::string const &section) const
 

Protected Attributes

ContentType m_ConfigContent
 
ListContentType m_ListContent
 
std::map< std::string, unsigned int > m_ListSize
 

Detailed Description

Definition at line 26 of file mitkConfigFileReader.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> ConfigFileReader::ContentType
protected

Definition at line 31 of file mitkConfigFileReader.h.

typedef std::map<std::string, std::vector<std::string> > ConfigFileReader::ListContentType
protected

Definition at line 32 of file mitkConfigFileReader.h.

Constructor & Destructor Documentation

ConfigFileReader::ConfigFileReader ( std::string const &  configFile)
inline

Definition at line 87 of file mitkConfigFileReader.h.

References ReadFile().

Member Function Documentation

std::string ConfigFileReader::ContentIndex ( std::string const &  section,
std::string const &  entry 
) const
inlineprotected

Definition at line 70 of file mitkConfigFileReader.h.

Referenced by IntValue(), ReadStream(), and Value().

int ConfigFileReader::IntValue ( const std::string &  section,
const std::string &  entry 
) const
inline

Definition at line 159 of file mitkConfigFileReader.h.

References Value().

Referenced by IntValue(), and main().

int ConfigFileReader::IntValue ( const std::string &  section,
const std::string &  entry,
int  standard 
)
inline

Definition at line 167 of file mitkConfigFileReader.h.

References ContentIndex(), and IntValue().

std::string ConfigFileReader::ListIndex ( std::string const &  section,
unsigned int  index 
) const
inlineprotected

Definition at line 61 of file mitkConfigFileReader.h.

Referenced by ReadStream(), and Vector().

unsigned int ConfigFileReader::ListSize ( std::string const &  section) const
inline

Definition at line 187 of file mitkConfigFileReader.h.

References ListSizeIndex().

Referenced by ListSize(), and ReadStream().

unsigned int ConfigFileReader::ListSize ( std::string const &  section,
unsigned int  standard 
)
inline

Definition at line 194 of file mitkConfigFileReader.h.

References ListSize(), and ListSizeIndex().

std::string ConfigFileReader::ListSizeIndex ( std::string const &  section) const
inlineprotected

Definition at line 78 of file mitkConfigFileReader.h.

Referenced by ListSize(), and ReadStream().

void ConfigFileReader::ReadFile ( std::string const &  filePath)
inline

Definition at line 92 of file mitkConfigFileReader.h.

References ReadStream().

Referenced by ConfigFileReader(), and main().

void ConfigFileReader::ReadStream ( std::istream &  stream)
inline

Definition at line 99 of file mitkConfigFileReader.h.

References ContentIndex(), line, ListIndex(), ListSize(), ListSizeIndex(), RemoveComment(), and Trim().

Referenced by main(), and ReadFile().

std::string ConfigFileReader::RemoveComment ( std::string const &  source,
char const *  delim = "#;" 
)
inlineprotected

Definition at line 52 of file mitkConfigFileReader.h.

References Trim().

Referenced by ReadStream().

std::string ConfigFileReader::Trim ( std::string const &  source,
char const *  delim = " \t\r\n" 
)
inlineprotected

Definition at line 38 of file mitkConfigFileReader.h.

Referenced by ReadStream(), and RemoveComment().

std::string ConfigFileReader::Value ( std::string const &  section,
std::string const &  entry 
) const
inline

Definition at line 140 of file mitkConfigFileReader.h.

References ContentIndex().

Referenced by IntValue(), main(), and Value().

std::string ConfigFileReader::Value ( const std::string &  section,
const std::string &  entry,
const std::string &  standard 
)
inline

Definition at line 148 of file mitkConfigFileReader.h.

References ContentIndex(), and Value().

std::vector<std::string> ConfigFileReader::Vector ( std::string const &  section,
unsigned int  index 
) const
inline

Definition at line 180 of file mitkConfigFileReader.h.

References ListIndex().

Referenced by main().

Member Data Documentation

ContentType ConfigFileReader::m_ConfigContent
protected

Definition at line 34 of file mitkConfigFileReader.h.

ListContentType ConfigFileReader::m_ListContent
protected

Definition at line 35 of file mitkConfigFileReader.h.

std::map<std::string, unsigned int > ConfigFileReader::m_ListSize
protected

Definition at line 36 of file mitkConfigFileReader.h.


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