StormByte C++ Library: Config module 0.0.9999
StormByte-Config is a StormByte library module for parsing configuration files
|
Represents a comment item in a configuration file. More...
#include <comment.hxx>
Public Member Functions | |
Comment (const std::string &comment) | |
Constructs a Comment with the given string. | |
Comment (std::string &&comment) | |
Comment (const Comment &base)=default | |
Comment (Comment &&base)=default | |
Comment & | operator= (const Comment &base)=default |
Comment & | operator= (Comment &&base)=default |
~Comment () noexcept override=default | |
std::string | Serialize (const int &indent_level) const noexcept override |
constexpr Item::Type | Type () const noexcept override |
constexpr CommentType | CommentType () const noexcept |
constexpr std::string | CommentTypeToString () const noexcept |
PointerType | Clone () const override |
PointerType | Move () override |
![]() | |
Value (const T &value) | |
Constructs a Value with the given value. | |
Value (const char *value) | |
Value (const char *name, const char *value) | |
Value (T &&value) | |
Value (const std::string &name, const T &value) | |
Value (std::string &&name, T &&value) | |
Value (const std::string &name, const char *value) | |
Value (std::string &&name, const char *value) | |
Value (const Value &single)=default | |
Value (Value &&single) noexcept=default | |
Value & | operator= (const Value &single)=default |
Value & | operator= (Value &&single) noexcept=default |
virtual | ~Value () noexcept override=default |
bool | operator== (const Value< T > &single) const noexcept |
Checks if two Value objects are equal. | |
bool | operator!= (const Value< T > &single) const noexcept |
T & | operator* () noexcept |
const T & | operator* () const noexcept |
std::string | Serialize (const int &indent_level) const noexcept override |
Serializes the item to a string. | |
![]() | |
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 |
constexpr std::string | TypeToString () const noexcept |
operator std::string () const | |
template<typename T > | |
const T & | Value () const |
template<typename T > | |
T & | Value () |
Additional Inherited Members | |
![]() | |
T | m_value |
The value of the item. | |
![]() | |
std::optional< std::string > | m_name |
Item name. | |
Represents a comment item in a configuration file.
T | The type of the comment (e.g., single-line or multi-line). |
|
inline |
Constructs a Comment with the given string.
comment | The comment string. |
|
inline |
Move Constructor
comment | comment string |
|
default |
Copy constructor
base | comment to copy |
|
default |
Move constructor
base | comment to move |
|
overridedefaultnoexcept |
Destructor
|
inlineoverridevirtual |
Clones the comment
Reimplemented from StormByte::Config::Item::Value< std::string >.
|
inlineconstexprnoexcept |
Gets the comment string
|
inlineconstexprnoexcept |
Converts comment type to string
|
inlineoverridevirtual |
Moves the comment
Reimplemented from StormByte::Config::Item::Value< std::string >.
|
default |
Move assignment operator
base | comment to move |
|
default |
Assignment operator
base | comment to copy |
|
overridevirtualnoexcept |
Serializes the comment item
indent_level | intentation level |
Reimplemented from StormByte::Config::Item::Base.
|
inlineconstexproverridevirtualnoexcept |
Gets the item type
Reimplemented from StormByte::Config::Item::Value< std::string >.