|
ActiveLib
|
#include <Package.h>


Public Types | |
| 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 | |
| bool | isRoot () const |
| virtual bool | isAttributeFirst () const |
| virtual void | setDefault () |
| virtual bool | insert (Cargo::Unique &&cargo, const Inventory::Item &item) |
| virtual bool | read (const utility::String &source) |
| void | setRoot (bool state) |
| virtual bool | finaliseAttributes () |
Public Member Functions inherited from active::serialise::Cargo | |
| Cargo () | |
| Cargo (const Cargo &source) | |
| virtual | ~Cargo ()=default |
| virtual bool | fillInventory (Inventory &inventory) const =0 |
| virtual Cargo::Unique | getCargo (const Inventory::Item &item) const =0 |
| virtual void | clear () |
| virtual bool | validate () |
Interface for package objects (encapsulating multiple data items and/or packages) that support serialisation
|
inlinevirtual |
Finalise the package attributes (called when isAttributeFirst = true and attributes have been imported)
|
inlinevirtual |
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 in active::serialise::PackageWrap, active::serialise::xml::XMLSolidPolygon< Vert, VertWrap >, active::serialise::xml::XMLSolidPolygon< geometry::PolyPoint, XMLPolyPoint >, active::serialise::xml::XMLPolygon< Vert, VertWrap, Hole, HoleWrap >, active::serialise::xml::XMLValueSetting, and active::serialise::doc::Object.
|
inlinevirtual |
Determine if the package requires attributes to be imported first (primarily for unordered serialisation, e.g. JSON)
|
inline |
Determine if the package is the outermost/root layer of a hierarchy
|
inlinevirtual |
Import the package from a string
| source | The string to read |
Reimplemented in active::serialise::PackageWrap.
|
inlinevirtual |
Set to the default package content
Implements active::serialise::Cargo.
Reimplemented in active::serialise::Pair, active::serialise::doc::Object, active::serialise::PackageWrap, active::serialise::xml::XMLPoint, active::serialise::xml::XMLSolidPolygon< Vert, VertWrap >, active::serialise::xml::XMLSolidPolygon< geometry::PolyPoint, XMLPolyPoint >, active::serialise::xml::XMLPolyPoint, active::serialise::xml::XMLValueSetting, and active::serialise::xml::XMLProlog.
|
inline |
Set whether the package is the outermost/root layer of a hierarchy
| state | True if the package is the outermost/root layer of a hierarchy |