identt
Public Types | Public Member Functions | Static Public Member Functions | List of all members
identt::utils::CfgFileOptions Class Reference

Public Types

using pointer = std::shared_ptr< CfgFileOptions >
 
using ssPairT = std::pair< std::string, std::string >
 
using ssMapT = std::map< std::string, std::string >
 
using sListT = std::list< std::string >
 

Public Member Functions

bool Check (const std::string Section, const std::string Name)
 Check : Check if Value Exists. More...
 
template<typename T >
Find (const std::string Section, const std::string Name, bool NoThrow=false)
 Find: Find an entry. More...
 
template<typename T >
FindList (const std::string Section, const sListT NameList, bool NoThrow=false)
 FindList: Find several entries. More...
 
void Show ()
 Show: Show all entries. More...
 
void Update (const std::string Section, const std::string Name, std::string Value)
 Update: Update or Add an entry. More...
 
std::string MakeKey (std::string Section, std::string Name)
 MakeKey: Merge Section and Name. More...
 

Static Public Member Functions

static pointer create (const std::string InputFile)
 create More...
 

Member Function Documentation

§ Check()

bool identt::utils::CfgFileOptions::Check ( const std::string  Section,
const std::string  Name 
)

Check : Check if Value Exists.

Parameters
Sectionstd::string Section to find it in
Namestd::string Name to find
Returns
bool

§ create()

static pointer identt::utils::CfgFileOptions::create ( const std::string  InputFile)
inlinestatic

create

Parameters
InputFilestd::string Input File Name

§ Find()

template<typename T >
T identt::utils::CfgFileOptions::Find ( const std::string  Section,
const std::string  Name,
bool  NoThrow = false 
)
inline

Find: Find an entry.

Parameters
Sectionstd::string Section to find it in
Namestd::string Name to find
NoThrowBool get default-val if true, defult false.
Returns
Type

else look for inherited section, duplicate is checked so inf loop not possible

recurse if not found

§ FindList()

template<typename T >
T identt::utils::CfgFileOptions::FindList ( const std::string  Section,
const sListT  NameList,
bool  NoThrow = false 
)
inline

FindList: Find several entries.

Parameters
Sectionstd::string Section to find it in
NameListsListT Names to find
NoThrowBool get default-val if true, defult false.
Returns
Type

§ MakeKey()

std::string identt::utils::CfgFileOptions::MakeKey ( std::string  Section,
std::string  Name 
)

MakeKey: Merge Section and Name.

Parameters
Sectionstd::string Section to find it in
Namestd::string Name to find
Returns
std::string merged

§ Show()

void identt::utils::CfgFileOptions::Show ( )

Show: Show all entries.

Returns
none

§ Update()

void identt::utils::CfgFileOptions::Update ( const std::string  Section,
const std::string  Name,
std::string  Value 
)

Update: Update or Add an entry.

Parameters
Sectionstd::string Section
Namestd::string Name
Valuestd::string Value
Returns
none

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