|
ActiveLib
|
#include <ValueWrap.h>


Public Types | |
| using | base = std::reference_wrapper<T> |
| Item reference base. | |
Public Types inherited from active::serialise::Item | |
| enum class | Type { text , number , boolean } |
Public Types inherited from active::serialise::Cargo | |
| using | Unique = std::unique_ptr<Cargo> |
| Unique pointer. | |
| using | Shared = std::shared_ptr<Cargo> |
| Shared pointer. | |
| using | size_type = std::string::size_type |
| Class size type. | |
| using | sizeOption = std::optional<size_type> |
| Optional size type (used to indicate an unspecified or non-existant position) | |
Public Member Functions | |
| ValueWrap (T &val) | |
| ValueWrap (const T &val) | |
| virtual bool | write (utility::String &dest) const override |
| virtual bool | read (const utility::String &source) override |
| virtual bool | read (const setting::Value &source) override |
| virtual void | setDefault () override |
| virtual std::optional< Item::Type > | type () const override |
| bool | read (const utility::String &source) |
| bool | write (utility::String &dest) const |
| std::optional< Item::Type > | type () const |
| bool | write (utility::String &dest) const |
| std::optional< Item::Type > | type () const |
| bool | read (const utility::String &source) |
| bool | write (utility::String &dest) const |
| std::optional< Item::Type > | type () const |
Public Member Functions inherited from active::serialise::Item | |
| virtual bool | fillInventory (Inventory &inventory) const |
| virtual Cargo::Unique | getCargo (const Inventory::Item &item) const |
Public Member Functions inherited from active::serialise::Cargo | |
| Cargo () | |
| Cargo (const Cargo &source) | |
| virtual | ~Cargo ()=default |
| virtual void | clear () |
| virtual bool | validate () |
Interface for a lightweight wrapper for passing a reference to item data into (de)serialise functions
Template parameters are: T: Value native type
|
inline |
Constructor
| val | The item value |
|
inline |
Constructor
| val | The item value |
|
inlineoverridevirtual |
Read the cargo data from the specified setting
| source | The setting to read |
Reimplemented from active::serialise::Item.

|
inlinevirtual |
Import the object from the specified string (specialisations for TextEncoding)
| source | The string to read |
Implements active::serialise::Item.
|
inlinevirtual |
Import the object from the specified string (specialisation for bool)
| source | The string to read |
Implements active::serialise::Item.

|
inlineoverridevirtual |
Read the item from a string
| source | The string to read |
Implements active::serialise::Item.

|
inlineoverridevirtual |
Set to the default package content
Implements active::serialise::Cargo.
|
inlinevirtual |
Get the serialisation type for the item value (specialisation for string)
Reimplemented from active::serialise::Item.
|
inlinevirtual |
Get the serialisation type for the item value (specialisation for guid)
Reimplemented from active::serialise::Item.
|
inlinevirtual |
Get the serialisation type for the item value (specialisation for bool)
Reimplemented from active::serialise::Item.
|
inlineoverridevirtual |
Get the serialisation type for the item value
Reimplemented from active::serialise::Item.
|
inlinevirtual |
Export the object to the specified string (specialisations for TextEncoding)
| dest | The string to write the data to |
Implements active::serialise::Item.
Reimplemented in active::serialise::xml::XMLNumber.
|
inlinevirtual |
Write the item to a string (specialisation for guid)
| dest | The string to write the data to |
Implements active::serialise::Item.
Reimplemented in active::serialise::xml::XMLNumber.
|
inlinevirtual |
Export the object to the specified string (specialisation for bool)
| dest | The string to write the data to |
Implements active::serialise::Item.
Reimplemented in active::serialise::xml::XMLNumber.
|
inlineoverridevirtual |
Write the item to a string
| dest | The string to write the data to |
Implements active::serialise::Item.
Reimplemented in active::serialise::xml::XMLNumber.