Template Numerical Library: TNL::Config::ConfigDescription Class Reference

Template Numerical Library version\ main:0b2c40fb1

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
TNL::Config::ConfigDescription Class Reference
Collaboration diagram for TNL::Config::ConfigDescription:
[legend]

## Public Member Functions
void | addDelimiter (const std::string &delimiter)
| Adds delimiter/section to the configuration description.
template<typename EntryType>
void | addEntry (const std::string &name, const std::string &description)
| Adds new entry to the configuration description.
template<typename EntryType>
void | addEntry (const std::string &name, const std::string &description, const EntryType &defaultValue)
| Adds new entry to the configuration description.
template<typename EntryType = std::string>
void | addEntryEnum (EntryType entryEnum=EntryType{})
| Adds new entry enumeration of type EntryType.
template<typename EntryType>
void | addList (const std::string &name, const std::string &description)
| Adds new list to the configuration description.
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.
template<typename EntryType>
void | addRequiredEntry (const std::string &name, const std::string &description)
| Adds new entry to the configuration description, that requires set value.
template<typename EntryType>
void | addRequiredList (const std::string &name, const std::string &description)
| Adds new list to the configuration description, that requires specific value.
auto | begin () const noexcept
auto | begin () noexcept
auto | cbegin () const noexcept
auto | cend () const noexcept
auto | end () const noexcept
auto | end () noexcept
const ConfigEntryBase * | getEntry (const std::string &name) const
| Gets entry out of the configuration description.

## Protected Attributes
ConfigEntryBase * | currentEntry = 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

  delimiter | String 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

  EntryType | Type of the entry.

Parameters

  name | Name of the entry.
  description | More 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

  EntryType | Type of the entry.

Parameters

  name | Name of the entry.
  description | More specific information about the entry.
  defaultValue | Default value of the entry.

## ◆ addEntryEnum()

template<typename EntryType = std::string>

void TNL::Config::ConfigDescription::addEntryEnum | ( | EntryType | entryEnum = EntryType{} | ) |
| inline

Adds new entry enumeration of type EntryType.

Adds new option of setting an entry value.

Template Parameters

  EntryType | Type of the entry enumeration.

Parameters

  entryEnum | Value 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

  EntryType | Type of the list.

Parameters

  name | Name of the list.
  description | More 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

  EntryType | Type of the list.

Parameters

  name | Name of the list.
  description | More specific information about the list.
  defaultValue | Default 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

  EntryType | Type of the entry.

Parameters

  name | Name of the entry.
  description | More 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

  EntryType | Type of the list.

Parameters

  name | Name of the list.
  description | More specific information about the list.

## ◆ getEntry()

const ConfigEntryBase * TNL::Config::ConfigDescription::getEntry | ( | const std::string & | name | ) | const
| inlinenodiscard

Gets entry out of the configuration description.

Parameters

  name | Name of the entry.

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

- src/TNL/Config/ConfigDescription.h