this class is used for parsing configuration files  
 More...
#include <iniParser.h>
 | 
|   | IniParser () | 
|   | constructor  More...
  | 
|   | 
| ClockError  | load (const std::string &file) | 
|   | loads given ini file  More...
  | 
|   | 
| ClockError  | save (const std::string &file) | 
|   | saves to given ini file  More...
  | 
|   | 
| template<typename T >  | 
| std::enable_if<!std::is_enum< T >::value, ClockError >::type  | getValue (const std::string §ion, const std::string &field, T &value) const | 
|   | fetches value from parsed ini file  More...
  | 
|   | 
| template<typename T >  | 
| std::enable_if< std::is_enum< T >::value, ClockError >::type  | getValue (const std::string §ion, const std::string &field, T &value) const | 
|   | 
| template<typename T >  | 
| std::enable_if<!std::is_enum< T >::value, void >::type  | setValue (const std::string §ion, const std::string &field, const T &value) | 
|   | sets value for a variable  More...
  | 
|   | 
| template<typename T >  | 
| std::enable_if< std::is_enum< T >::value, void >::type  | setValue (const std::string §ion, const std::string &field, const T &value) | 
|   | 
| void  | setValue (const std::string §ion, const std::string &field, const std::string &value) | 
|   | 
| std::vector< std::string >  | getAllSections () const | 
|   | returns all sections that can be found in this config file  More...
  | 
|   | 
| std::vector< std::string >  | getAllEntries (const std::string §ion) const | 
|   | returns all entries of the given section  More...
  | 
|   | 
| void  | removeEntry (const std::string §ion, const std::string &entry) | 
|   | removes the given entry from the section if this was the last entry for this section, also the section is removed  More...
  | 
|   | 
this class is used for parsing configuration files 
Definition at line 44 of file iniParser.h.
 
§ IniParser()
      
        
          | clockUtils::iniParser::IniParser::IniParser  | 
          ( | 
           | ) | 
           | 
        
      
 
 
§ getAllEntries()
      
        
          | std::vector<std::string> clockUtils::iniParser::IniParser::getAllEntries  | 
          ( | 
          const std::string &  | 
          section | ) | 
           const | 
        
      
 
returns all entries of the given section 
 
 
§ getAllSections()
      
        
          | std::vector<std::string> clockUtils::iniParser::IniParser::getAllSections  | 
          ( | 
           | ) | 
           const | 
        
      
 
returns all sections that can be found in this config file 
 
 
§ getValue() [1/2]
template<typename T > 
  
  
      
        
          | std::enable_if<!std::is_enum<T>::value, ClockError>::type clockUtils::iniParser::IniParser::getValue  | 
          ( | 
          const std::string &  | 
          section,  | 
         
        
           | 
           | 
          const std::string &  | 
          field,  | 
         
        
           | 
           | 
          T &  | 
          value  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
fetches value from parsed ini file 
- Parameters
 - 
  
    | [in] | section | the section of the variable  | 
    | [in] | field | the name of the variable  | 
    | [out] | value | the variable the value should be stored in  | 
  
   
- Returns
 - ClockError::SUCCESS if value found, otherwise an error code. If the section or field was not found, value stays unchanged. Otherwise the streamoperator will be called 
 
Definition at line 72 of file iniParser.h.
 
 
§ getValue() [2/2]
template<typename T > 
  
  
      
        
          | std::enable_if<std::is_enum<T>::value, ClockError>::type clockUtils::iniParser::IniParser::getValue  | 
          ( | 
          const std::string &  | 
          section,  | 
         
        
           | 
           | 
          const std::string &  | 
          field,  | 
         
        
           | 
           | 
          T &  | 
          value  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
 
§ load()
      
        
          | ClockError clockUtils::iniParser::IniParser::load  | 
          ( | 
          const std::string &  | 
          file | ) | 
           | 
        
      
 
loads given ini file 
- Returns
 - ClockError::SUCCESS if no problems occured, otherwise an error code 
 
 
 
§ removeEntry()
      
        
          | void clockUtils::iniParser::IniParser::removeEntry  | 
          ( | 
          const std::string &  | 
          section,  | 
        
        
           | 
           | 
          const std::string &  | 
          entry  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
removes the given entry from the section if this was the last entry for this section, also the section is removed 
 
 
§ save()
      
        
          | ClockError clockUtils::iniParser::IniParser::save  | 
          ( | 
          const std::string &  | 
          file | ) | 
           | 
        
      
 
saves to given ini file 
- Returns
 - ClockError::SUCCESS if no problems occured, otherwise an error code 
 
 
 
§ setValue() [1/3]
template<typename T > 
  
  
      
        
          | std::enable_if<!std::is_enum<T>::value, void>::type clockUtils::iniParser::IniParser::setValue  | 
          ( | 
          const std::string &  | 
          section,  | 
         
        
           | 
           | 
          const std::string &  | 
          field,  | 
         
        
           | 
           | 
          const T &  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
sets value for a variable 
- Parameters
 - 
  
    | [in] | section | the section of the variable  | 
    | [in] | field | the name of the variable  | 
    | [in] | value | the value to be stored  | 
  
   
Definition at line 118 of file iniParser.h.
 
 
§ setValue() [2/3]
template<typename T > 
  
  
      
        
          | std::enable_if<std::is_enum<T>::value, void>::type clockUtils::iniParser::IniParser::setValue  | 
          ( | 
          const std::string &  | 
          section,  | 
         
        
           | 
           | 
          const std::string &  | 
          field,  | 
         
        
           | 
           | 
          const T &  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
§ setValue() [3/3]
  
  
      
        
          | void clockUtils::iniParser::IniParser::setValue  | 
          ( | 
          const std::string &  | 
          section,  | 
         
        
           | 
           | 
          const std::string &  | 
          field,  | 
         
        
           | 
           | 
          const std::string &  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
The documentation for this class was generated from the following file: