59 template<CommentType T>
class Comment;
95 Base& operator=(const
Base& base) noexcept = default;
114 bool operator==(const
Base& base) const noexcept;
121 bool operator!=(const
Base& base) const noexcept;
127 constexpr const
StormByte::Safe::String& Name() const noexcept {
143 void Name(std::string_view name);
155 constexpr
std::string_view TypeToString() const noexcept {
156 return Item::TypeToString(this->
Type());
178 template<
class T>
decltype(
auto)
As();
185 template<
class T>
decltype(
auto)
As()
const;
Base class for all configuration items.
Definition base.hxx:65
constexpr void Name(const StormByte::Safe::String &name)
Sets the name of the item.
Definition base.hxx:135
virtual bool Equals(const Base &base) const =0
Equals.
decltype(auto) As()
Typed view of this item.
Base() noexcept
Constructor.
static bool IsNameValid(const StormByte::Safe::String &name) noexcept
Checks if name is valid.
static bool IsNameValid(std::string_view name) noexcept
Checks if name is valid.
decltype(auto) As() const
Typed view of this item.
StormByte::Safe::String m_name
Name of the item.
Definition base.hxx:195
void Name(std::string_view name)
Sets the name of the item.
virtual constexpr Item::Type Type() const noexcept=0
Gets the type of the item.
virtual StormByte::Safe::String Serialize(const int &indent_level=0) const
Serializes the item as text.
Configuration items (values, comments, groups, lists).
Definition hook.hxx:49
Type
Node kind in the document tree.
Definition type.hxx:56
@ Container
Group or list.
@ Value
Any leaf (Value node). Not used on the wire.
@ Group
Group of named items.
@ List
List of unnamed items.
#define STORMBYTE_CONFIG_PUBLIC
Definition visibility.h:52