CosmoGRaPH v0.0
Public Member Functions | Private Attributes | List of all members
cosmo::ConfigParser Class Reference
Collaboration diagram for cosmo::ConfigParser:
Collaboration graph
[legend]

Public Member Functions

 ConfigParser (std::string fname)
 
void parse (std::string fname)
 
std::string getFileName ()
 
std::string operator[] (std::string param)
 Get value of required parameter. More...
 
std::string operator() (std::string param, std::string default_val)
 Get value of parameter; use default if not set. More...
 

Private Attributes

std::map< std::string, std::string > config
 
std::string fileName
 

Member Function Documentation

std::string cosmo::ConfigParser::operator() ( std::string  param,
std::string  default_val 
)

Get value of parameter; use default if not set.

Parameters
paramparameter name string
default_valdefault_val to use if param was not set
std::string cosmo::ConfigParser::operator[] ( std::string  param)

Get value of required parameter.

Parameters
[in]paramparameter name string

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