StormByte C++ Library: Config module 0.0.9999
StormByte-Config is a StormByte library module for parsing configuration files
|
The base class for all configuration items. More...
#include <base.hxx>
Public Member Functions | |
Base ()=default | |
Constructs a Base item with an optional name. | |
Base (const std::string &name) | |
Constructs a Base item with an optional name. | |
Base (const Base &base)=default | |
Base (Base &&base) noexcept=default | |
Base & | operator= (const Base &base)=default |
Base & | operator= (Base &&base) noexcept=default |
virtual | ~Base () noexcept=default |
bool | operator== (const Base &base) const noexcept |
bool | operator!= (const Base &base) const noexcept |
constexpr const std::optional< std::string > & | Name () const noexcept |
Gets the name of the item. | |
constexpr void | Name (const std::string &name) noexcept |
bool | IsNameValid () const noexcept |
virtual constexpr Type | Type () const noexcept=0 |
constexpr std::string | TypeToString () const noexcept |
virtual std::string | Serialize (const int &indent_level) const noexcept |
operator std::string () const | |
template<typename T > | |
const T & | Value () const |
template<typename T > | |
T & | Value () |
Protected Attributes | |
std::optional< std::string > | m_name |
Item name. | |
The base class for all configuration items.
|
default |
Constructs a Base item with an optional name.
name | The name of the item. |
StormByte::Config::Item::Base::Base | ( | const std::string & | name | ) |
Constructs a Base item with an optional name.
name | The name of the item. |
|
default |
Copy constructor
base | item to copy |
|
defaultnoexcept |
Move constructor
base | item to move |
|
virtualdefaultnoexcept |
Destructor
|
inlinenoexcept |
Checks if current name is valid
|
inlineconstexprnoexcept |
Gets the name of the item.
|
inlineconstexprnoexcept |
Sets the item name
|
inline |
Converts current configuration to string
|
inlinenoexcept |
Inequality operator
base | item to compare |
Move assignment operator
base | item to move |
Assignment operator
base | item to copy |
|
inlinenoexcept |
Equality operator
base | item to compare |
|
virtualnoexcept |
Gets the item name
Reimplemented in StormByte::Config::Item::Comment< T >, StormByte::Config::Item::Container, StormByte::Config::Item::Value< T >, and StormByte::Config::Item::Value< std::string >.
|
constexprpure virtualnoexcept |
Gets the item name
Implemented in StormByte::Config::Item::Comment< T >, StormByte::Config::Item::Container, StormByte::Config::Item::Value< T >, and StormByte::Config::Item::Value< std::string >.
|
inlineconstexprnoexcept |
Gets the item type as string
|
inline |
Gets the item value
T | item value type |
|
inline |
Gets the item value
T | item value type |