Template Numerical Library version\ main:eacc201d
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
TNL::Config::ConfigDescription Class Reference
Collaboration diagram for TNL::Config::ConfigDescription:
Collaboration graph
[legend]

Public Member Functions

void addDelimiter (const std::string &delimiter)
 Adds delimiter/section to the configuration description. More...
 
template<typename EntryType >
void addEntry (const std::string &name, const std::string &description)
 Adds new entry to the configuration description. More...
 
template<typename EntryType >
void addEntry (const std::string &name, const std::string &description, const EntryType &defaultValue)
 Adds new entry to the configuration description. More...
 
template<typename EntryType = std::string>
void addEntryEnum (const EntryType entryEnum=EntryType{})
 Adds new entry enumeration of type EntryType. More...
 
template<typename EntryType >
void addList (const std::string &name, const std::string &description)
 Adds new list to the configuration description. More...
 
template<typename EntryType >
void addList (const std::string &name, const std::string &description, const std::vector< EntryType > &defaultValue)
 Adds new list to the configuration description. More...
 
template<typename EntryType >
void addRequiredEntry (const std::string &name, const std::string &description)
 Adds new entry to the configuration description, that requires set value. More...
 
template<typename EntryType >
void addRequiredList (const std::string &name, const std::string &description)
 Adds new list to the configuration description, that requires specific value. More...
 
auto begin () const noexcept
 
auto begin () noexcept
 
auto cbegin () const noexcept
 
auto cend () const noexcept
 
auto end () const noexcept
 
auto end () noexcept
 
const ConfigEntryBasegetEntry (const std::string &name) const
 Gets entry out of the configuration description. More...
 

Protected Attributes

ConfigEntryBasecurrentEntry = nullptr
 
std::vector< std::unique_ptr< ConfigEntryBase > > entries
 
bool isCurrentEntryList = false
 

Member Function Documentation

◆ addDelimiter()

void TNL::Config::ConfigDescription::addDelimiter ( const std::string delimiter)
inline

Adds delimiter/section to the configuration description.

Parameters
delimiterString that defines how the delimiter looks like.

◆ addEntry() [1/2]

template<typename EntryType >
void TNL::Config::ConfigDescription::addEntry ( const std::string name,
const std::string description 
)
inline

Adds new entry to the configuration description.

Template Parameters
EntryTypeType of the entry.
Parameters
nameName of the entry.
descriptionMore specific information about the entry.

◆ addEntry() [2/2]

template<typename EntryType >
void TNL::Config::ConfigDescription::addEntry ( const std::string name,
const std::string description,
const EntryType &  defaultValue 
)
inline

Adds new entry to the configuration description.

Template Parameters
EntryTypeType of the entry.
Parameters
nameName of the entry.
descriptionMore specific information about the entry.
defaultValueDefault value of the entry.

◆ addEntryEnum()

template<typename EntryType = std::string>
void TNL::Config::ConfigDescription::addEntryEnum ( const EntryType  entryEnum = EntryType{})
inline

Adds new entry enumeration of type EntryType.

Adds new option of setting an entry value.

Template Parameters
EntryTypeType of the entry enumeration.
Parameters
entryEnumValue of the entry enumeration.

◆ addList() [1/2]

template<typename EntryType >
void TNL::Config::ConfigDescription::addList ( const std::string name,
const std::string description 
)
inline

Adds new list to the configuration description.

Template Parameters
EntryTypeType of the list.
Parameters
nameName of the list.
descriptionMore specific information about the list.

◆ addList() [2/2]

template<typename EntryType >
void TNL::Config::ConfigDescription::addList ( const std::string name,
const std::string description,
const std::vector< EntryType > &  defaultValue 
)
inline

Adds new list to the configuration description.

Template Parameters
EntryTypeType of the list.
Parameters
nameName of the list.
descriptionMore specific information about the list.
defaultValueDefault value of the list.

◆ addRequiredEntry()

template<typename EntryType >
void TNL::Config::ConfigDescription::addRequiredEntry ( const std::string name,
const std::string description 
)
inline

Adds new entry to the configuration description, that requires set value.

Template Parameters
EntryTypeType of the entry.
Parameters
nameName of the entry.
descriptionMore specific information about the entry.

◆ addRequiredList()

template<typename EntryType >
void TNL::Config::ConfigDescription::addRequiredList ( const std::string name,
const std::string description 
)
inline

Adds new list to the configuration description, that requires specific value.

Template Parameters
EntryTypeType of the list.
Parameters
nameName of the list.
descriptionMore specific information about the list.

◆ getEntry()

const ConfigEntryBase * TNL::Config::ConfigDescription::getEntry ( const std::string name) const
inline

Gets entry out of the configuration description.

Parameters
nameName of the entry.

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