|
ActiveLib
|
#include <PackageWrap.h>


Public Types | |
| using | base = std::reference_wrapper<Package> |
| Item reference base. | |
Public Types inherited from active::serialise::Package | |
| using | Unique = std::unique_ptr<Package> |
| Unique pointer. | |
| using | Shared = std::shared_ptr<Package> |
| Shared pointer. | |
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 | |
| PackageWrap (Package &source) | |
| PackageWrap (const Package &source) | |
| PackageWrap (const PackageWrap &source) | |
| virtual | ~PackageWrap ()=default |
| virtual bool | fillInventory (Inventory &inventory) const override |
| virtual Cargo::Unique | getCargo (const Inventory::Item &item) const override |
| virtual void | clear () override |
| virtual void | setDefault () override |
| virtual bool | validate () override |
| virtual bool | read (const utility::String &source) override |
| virtual bool | insert (Cargo::Unique &&cargo, const Inventory::Item &item) override |
Public Member Functions inherited from active::serialise::Package | |
| bool | isRoot () const |
| virtual bool | isAttributeFirst () const |
| void | setRoot (bool state) |
| virtual bool | finaliseAttributes () |
Public Member Functions inherited from active::serialise::Cargo | |
| Cargo () | |
| Cargo (const Cargo &source) | |
| virtual | ~Cargo ()=default |
Lightweight interface wrapper for passing a reference to a serialisable package into (de)serialisation functions
|
inline |
Constructor
| source | The source package to wrap |
|
inline |
Constructor
| source | The source package to wrap |
|
inline |
Copy constructor
| source | The object to copy |
|
virtualdefault |
Destructor
|
inlineoverridevirtual |
Clear the data content (typically a reset to defaults)
Reimplemented from active::serialise::Cargo.
|
inlineoverridevirtual |
Fill an inventory with the cargo items
| inventory | The inventory to receive the cargo items |
Implements active::serialise::Cargo.
|
inlineoverridevirtual |
Get the specified cargo
| item | The inventory item to retrieve |
Implements active::serialise::Cargo.
|
inlineoverridevirtual |
Insert specified cargo into the package - used for cargo with many instances sharing the same ID (e.g. from an array/map)
| cargo | The cargo to insert |
| item | The inventory item linked with the cargo |
Reimplemented from active::serialise::Package.
|
inlineoverridevirtual |
Read the cargo data from the specified string
| source | The string to read |
Reimplemented from active::serialise::Package.
|
inlineoverridevirtual |
Set to the default package content
Reimplemented from active::serialise::Package.
|
inlineoverridevirtual |
Validate the cargo data
Reimplemented from active::serialise::Cargo.