StormByte C++ Library: Config module 1.0.1.9999
StormByte-Config is the configuration module of the StormByte C++ suite.
Loading...
Searching...
No Matches
list.hxx
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Config.
5 *
6 * StormByte-Config is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License version 3
8 * or later, as published by the Free Software Foundation.
9 *
10 * StormByte-Config is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with StormByte-Config. If not, see
17 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
18 */
19
20#pragma once
21
22#include <StormByte/config/item/container.hxx>
23
38 class STORMBYTE_CONFIG_PUBLIC List final: public Container {
39 public:
47 List() = default;
48
53 List(const std::string& name);
54
59 List(std::string&& name);
60
65 List(const List& list) = default;
66
71 List(List&& list) noexcept = default;
72
78 List& operator=(const List& list) = default;
79
85 List& operator=(List&& list) noexcept = default;
86
90 ~List() noexcept override = default;
101 inline PointerType Clone() const override {
102 return MakePointer<List>(*this);
103 }
104
109 inline PointerType Move() override {
110 return MakePointer<List>(std::move(*this));
111 }
112
117 constexpr Item::ContainerType ContainerType() const noexcept override {
118 return ContainerType::List;
119 }
122 private:
130 Base::PointerType BeforeAdditionActions(Base::PointerType item, const StormByte::Config::OnExistingAction onexisting) override;
131 };
132}
Holds child items. Group and List derive from this.
Definition container.hxx:38
Unnamed-item container [ … ].
Definition list.hxx:38
List & operator=(List &&list) noexcept=default
Move assignment operator.
PointerType Move() override
Moves the list.
Definition list.hxx:109
List(List &&list) noexcept=default
Move constructor.
List()=default
Constructs an empty List.
List(const List &list)=default
Copy constructor.
List(const std::string &name)
Constructs a List with the given name.
List & operator=(const List &list)=default
Copy assignment operator.
~List() noexcept override=default
Destructor.
constexpr Item::ContainerType ContainerType() const noexcept override
Gets the container type.
Definition list.hxx:117
List(std::string &&name)
Constructs a List with the given name (move).
Configuration items (values, comments, groups, lists).
Definition alias.hxx:30
OnExistingAction
Forward declaration of the configuration document.
Definition typedefs.hxx:35