StormByte C++ Library: Config module
0.0.9999
StormByte-Config is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
lib
public
StormByte
config
item
comment.hxx
1
#pragma once
2
3
#include <StormByte/config/item/value.hxx>
4
5
#include <string>
6
11
namespace
StormByte::Config::Item {
17
template
<CommentType T>
18
class
STORMBYTE_CONFIG_PUBLIC
Comment
final:
public
Value
<std::string> {
19
public
:
24
Comment
(
const
std::string& comment):
Value
<std::string>(comment) {}
25
30
Comment
(std::string&& comment):
Value
<std::string>(std::move(comment)) {}
31
36
Comment
(
const
Comment
& base) =
default
;
37
42
Comment
(
Comment
&& base) =
default
;
43
48
Comment
&
operator=
(
const
Comment
& base) =
default
;
49
54
Comment
&
operator=
(
Comment
&& base) =
default
;
55
59
~Comment
() noexcept override = default;
60
66
std::
string
Serialize(const
int
& indent_level) const noexcept override;
67
72
constexpr
Item
::Type Type() const noexcept
override
{
73
return
Type::Comment;
74
}
75
80
constexpr
CommentType
CommentType
() const noexcept {
81
return
T;
82
}
83
88
constexpr
std::string
CommentTypeToString
() const noexcept {
89
return
Item::TypeToString(T);
90
}
91
96
PointerType
Clone
()
const override
{
97
return
MakePointer<Comment<T>>(*this);
98
}
99
104
PointerType
Move
()
override
{
105
return
MakePointer<Comment<T>>(std::move(*
this
));
106
}
107
};
108
}
StormByte::Config::Item::Comment
Represents a comment item in a configuration file.
Definition
comment.hxx:18
StormByte::Config::Item::Comment::Comment
Comment(const std::string &comment)
Constructs a Comment with the given string.
Definition
comment.hxx:24
StormByte::Config::Item::Comment::Comment
Comment(Comment &&base)=default
StormByte::Config::Item::Comment::operator=
Comment & operator=(const Comment &base)=default
StormByte::Config::Item::Comment::Comment
Comment(const Comment &base)=default
StormByte::Config::Item::Comment::~Comment
~Comment() noexcept override=default
StormByte::Config::Item::Comment::CommentTypeToString
constexpr std::string CommentTypeToString() const noexcept
Definition
comment.hxx:88
StormByte::Config::Item::Comment::CommentType
constexpr CommentType CommentType() const noexcept
Definition
comment.hxx:80
StormByte::Config::Item::Comment::Comment
Comment(std::string &&comment)
Definition
comment.hxx:30
StormByte::Config::Item::Comment::Move
PointerType Move() override
Definition
comment.hxx:104
StormByte::Config::Item::Comment::operator=
Comment & operator=(Comment &&base)=default
StormByte::Config::Item::Comment::Clone
PointerType Clone() const override
Definition
comment.hxx:96
StormByte::Config::Item::Value
Represents a configuration item with a value.
Definition
value.hxx:16
Item
All the configuration item classes namespace.
Generated by
1.9.8