Unnamed container ([ ... ]).
More...
#include <StormByte/config/item/list.hxx>


Public Member Functions | |
| List () noexcept | |
| Constructor. | |
| List (const StormByte::String::String &name) | |
| Constructor. | |
| List (StormByte::String::String &&name) | |
| Constructor. | |
| List (std::string_view name) | |
| Constructor. | |
| List (const List &list) | |
| Copy constructor. | |
| List (List &&list) noexcept | |
| Move constructor. | |
| List & | operator= (const List &list) |
| Assignment operator. | |
| List & | operator= (List &&list) noexcept |
| Move assignment operator. | |
| ~List () noexcept override | |
| Destructor. | |
| PointerType | Clone () const override |
| Clone. | |
| PointerType | Move () override |
| Move. | |
| constexpr Item::ContainerType | ContainerType () const noexcept override |
| Container type. | |
| constexpr Item::Type | Type () const noexcept override |
| Item type. | |
Public Member Functions inherited from StormByte::Config::Item::Container | |
| Container () | |
| Constructs an empty Container. | |
| Container (const StormByte::String::String &name) | |
| Constructs a Container with the given name. | |
| Container (StormByte::String::String &&name) | |
| Constructs a Container with the given name (move). | |
| Container (const Container &base) | |
| Copy constructor. | |
| Container (Container &&base) noexcept | |
| Move constructor. | |
| Container & | operator= (const Container &base) |
| Copy assignment operator. | |
| Container & | operator= (Container &&base) noexcept |
| Move assignment operator. | |
| virtual | ~Container () noexcept override |
| Destructor. | |
| Base & | Add (const Base &item, const StormByte::Config::OnExistingAction &on_existing) |
| Adds an item (const reference) using an explicit policy. | |
| Base & | Add (Base &&item, const StormByte::Config::OnExistingAction &on_existing) |
| Adds an item (rvalue) using an explicit policy. | |
| Base & | Add (const Base &item) |
| Adds an item using the container's current OnExistingAction policy. | |
| Base & | Add (Base &&item) |
| Adds an item using the container's current OnExistingAction policy (move). | |
| Base & | Add (Base::PointerType item) |
| Adds an item to the container using current policy. | |
| Base & | Add (Base::PointerType item, const StormByte::Config::OnExistingAction &on_existing) |
| Adds an item to the container. | |
| void | Clear () noexcept |
| Clears all items from the container. | |
| bool | Exists (const StormByte::String::String &path) const |
| Checks if an item exists by path. | |
| bool | Exists (std::string_view path) const |
| Checks if an item exists by a path view. | |
| void | Remove (const StormByte::Size &index) |
| Removes an item by index. | |
| void | Remove (const StormByte::String::String &path) |
| Removes an item by path. | |
| void | Remove (std::string_view path) |
| Removes an item by a path view. | |
| constexpr std::span< const Base::PointerType > | Items () noexcept |
| Items in this level. | |
| constexpr std::span< const Base::PointerType > | Items () const noexcept |
| Items in this level. | |
| StormByte::Size | Size () const noexcept |
| Gets the number of items in the current level. | |
| StormByte::Size | Count () const noexcept |
| Gets the total number of items including nested ones. | |
| void | SetOnExistingAction (StormByte::Config::OnExistingAction action) noexcept |
| Sets the action to take when an item with the same identity already exists. | |
| StormByte::Config::OnExistingAction | GetOnExistingAction () const noexcept |
| Gets the current OnExistingAction policy. | |
| bool | Equals (const Base &other) const noexcept override |
| Polymorphic equality comparison. | |
| Base & | operator[] (const StormByte::Size &index) |
| Gets a reference to an item by index. | |
| const Base & | operator[] (const StormByte::Size &index) const |
| Gets a const reference to an item by index. | |
| Base & | operator[] (const StormByte::String::String &path) |
| Gets a reference to an item by path. | |
| const Base & | operator[] (const StormByte::String::String &path) const |
| Gets a const reference to an item by path. | |
| Base & | operator[] (std::string_view path) |
| Gets a reference to an item by a path view. | |
| const Base & | operator[] (std::string_view path) const |
| Gets a const reference to an item by a path view. | |
| bool | operator== (const Container &container) const noexcept |
| Equality operator. | |
| bool | operator!= (const Container &container) const noexcept |
| Inequality operator. | |
| StormByte::String::String | Serialize (const int &indent_level) const noexcept override |
| Serializes the container to a string. | |
| constexpr std::string_view | ContainerTypeToString () const noexcept |
| Gets the container type as string. | |
Public Member Functions inherited from StormByte::Config::Item::Base | |
| Base () noexcept | |
| Constructor. | |
| Base (const StormByte::String::String &name) | |
| Constructor. | |
| Base (const Base &base) noexcept=default | |
| Copy constructor. | |
| Base (Base &&base) noexcept=default | |
| Move constructor. | |
| Base & | operator= (const Base &base) noexcept=default |
| Assignment operator. | |
| Base & | operator= (Base &&base) noexcept=default |
| Move assignment operator. | |
| ~Base () noexcept override | |
| Destructor. | |
| bool | operator== (const Base &base) const noexcept |
| Compares two items. | |
| bool | operator!= (const Base &base) const noexcept |
| Compares two items. | |
| constexpr const StormByte::String::String & | Name () const noexcept |
| Gets the name of the item. | |
| constexpr void | Name (const StormByte::String::String &name) |
| Sets the name of the item. | |
| void | Name (std::string_view name) |
| Sets the name of the item. | |
| constexpr std::string_view | TypeToString () const noexcept |
| Gets the type as string. | |
| template<class T > | |
| decltype(auto) | As () |
| Typed view of this item. | |
| template<class T > | |
| decltype(auto) | As () const |
| Typed view of this item. | |
Public Member Functions inherited from StormByte::Clonable< Base, StormByte::Shared< Base > > | |
| constexpr | Clonable ()=default |
| constexpr | Clonable (const Clonable &)=default |
| constexpr | Clonable (Clonable &&) noexcept=default |
| constexpr Clonable & | operator= (const Clonable &)=default |
| constexpr Clonable & | operator= (Clonable &&) noexcept=default |
| virtual constexpr | ~Clonable () noexcept=default |
Protected Member Functions | |
| Base::PointerType | BeforeAdditionActions (Base::PointerType item, const StormByte::Config::OnExistingAction onexisting) override |
| Actions before addition. | |
Additional Inherited Members | |
Public Types inherited from StormByte::Clonable< Base, StormByte::Shared< Base > > | |
| typedef SmartPointer | PointerType |
Static Public Member Functions inherited from StormByte::Config::Item::Container | |
| static constexpr std::pair< const char, const char > | EnclosureCharacters (const ContainerType &type) noexcept |
| Returns the enclosure characters for a given container type. | |
| static constexpr const char | EndCharacter (const ContainerType &type) noexcept |
| Returns the closing character for a given container type. | |
Static Public Member Functions inherited from StormByte::Config::Item::Base | |
| static bool | IsNameValid (const StormByte::String::String &name) noexcept |
| Checks if name is valid. | |
| static bool | IsNameValid (std::string_view name) noexcept |
| Checks if name is valid. | |
Static Public Member Functions inherited from StormByte::Clonable< Base, StormByte::Shared< Base > > | |
| static PointerType | MakePointer (Args &&... args) |
Protected Attributes inherited from StormByte::Config::Item::Container | |
| std::vector< Base::PointerType > | m_items |
| Items stored in the container. | |
| StormByte::Config::OnExistingAction | m_on_existing_action = StormByte::Config::OnExistingAction::ThrowException |
| Collision policy. | |
Protected Attributes inherited from StormByte::Config::Item::Base | |
| StormByte::String::String | m_name |
| Name of the item. | |
Unnamed container ([ ... ]).
|
noexcept |
Constructor.
|
explicit |
Constructor.
| name | name of the list |
|
explicit |
Constructor.
| name | name of the list |
|
explicit |
Constructor.
| name | name of the list |
| StormByte::Config::Item::List::List | ( | const List & | list | ) |
Copy constructor.
| list | list to copy |
|
noexcept |
Move constructor.
| list | list to move |
|
overridenoexcept |
Destructor.
|
overrideprotectedvirtual |
Actions before addition.
| item | item |
| onexisting | collision policy |
Implements StormByte::Config::Item::Container.
|
inlineoverridevirtual |
|
inlineconstexproverridevirtualnoexcept |
|
inlineoverridevirtual |
Assignment operator.
| list | list to copy |
Move assignment operator.
| list | list to move |
|
inlineconstexproverridevirtualnoexcept |