22#include <StormByte/config/item/value.hxx>
35 template<CommentType T>
36 class STORMBYTE_CONFIG_PUBLIC
Comment final:
public Value<std::string> {
46 Comment(
const std::string& comment):
Value<std::string>(comment) {}
52 Comment(std::string&& comment):
Value<std::string>(std::move(comment)) {}
95 bool Equals(const
Base& other) const noexcept
override {
96 if (this->
Type() != other.Type())
98 if (this->Name() != other.Name())
101 auto other_comment_type = other.GetCommentType();
102 if (!other_comment_type || *other_comment_type != T)
106 return **
this == *other_comment;
114 std::string
Serialize(
const int& indent_level)
const noexcept override;
121 return Type::Comment;
145 return Item::TypeToString(T);
152 PointerType
Clone()
const override {
153 return MakePointer<Comment<T>>(*this);
161 return MakePointer<Comment<T>>(std::move(*
this));
The base class for all configuration items.
Definition base.hxx:44
Named or unnamed typed value.
Definition value.hxx:37
Configuration items (values, comments, groups, lists).
Definition alias.hxx:30
enum STORMBYTE_CONFIG_PUBLIC CommentType
# until end of line
Definition type.hxx:71
Type
Represents the type of a configuration item.
Definition type.hxx:39