milupHPC documentation
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConfigParser Class Reference

Config parser class for reading input parameter/settings. More...

#include "config_parser.h"

+ Collaboration diagram for ConfigParser:
Collaboration graph

Public Member Functions

 ConfigParser ()
 
 ConfigParser (const std::string &file)
 
std::list< ConfigParser > getObjList (const std::string &key)
 
ConfigParser getObj (const std::string &key)
 
template<typename T >
T getVal (const std::string &key)
 
template<typename T >
std::list< T > getList (const std::string &key)
 

Private Member Functions

 ConfigParser (const boost::property_tree::ptree &subtree)
 

Private Attributes

boost::property_tree::ptree tree
 boost property tree instance More...
 

Detailed Description

Config parser class for reading input parameter/settings.

A config parser class able to read different input file formats. Currently supported formats are:

  • .info
  • .json

Definition at line 43 of file config_parser.h.

Constructor & Destructor Documentation

◆ ConfigParser() [1/3]

ConfigParser::ConfigParser ( )

Default constructor.

Definition at line 3 of file config_parser.cpp.

◆ ConfigParser() [2/3]

ConfigParser::ConfigParser ( const std::string &  file)

Constructor.

Parameters
fileInput config file.

Definition at line 6 of file config_parser.cpp.

◆ ConfigParser() [3/3]

ConfigParser::ConfigParser ( const boost::property_tree::ptree &  subtree)
private
Parameters
subtree

Definition at line 22 of file config_parser.cpp.

Member Function Documentation

◆ getList()

template<typename T >
std::list< T > ConfigParser::getList ( const std::string &  key)
Template Parameters
T
Parameters
key
Returns

Definition at line 120 of file config_parser.h.

◆ getObj()

ConfigParser ConfigParser::getObj ( const std::string &  key)
Parameters
key
Returns

Definition at line 24 of file config_parser.cpp.

+ Here is the call graph for this function:

◆ getObjList()

std::list< ConfigParser > ConfigParser::getObjList ( const std::string &  key)
Parameters
key
Returns

Definition at line 28 of file config_parser.cpp.

+ Here is the call graph for this function:

◆ getVal()

template<typename T >
T ConfigParser::getVal ( const std::string &  key)
Template Parameters
T
Parameters
key
Returns

Definition at line 109 of file config_parser.h.

Member Data Documentation

◆ tree

boost::property_tree::ptree ConfigParser::tree
private

boost property tree instance

Definition at line 99 of file config_parser.h.


The documentation for this class was generated from the following files:
  • include/utils/config_parser.h
  • src/utils/config_parser.cpp

milupHPC - ConfigParser Class Reference
Generated on Wed Aug 31 2022 12:16:53 by Doxygen 1.9.3