|
ActiveLib
|
#include <XMLPolygon.h>


Public Types | |
| enum | FieldIndex { hole } |
| The package fields. | |
| using | base = XMLSolidPolygon<Vert, VertWrap> |
Public Types inherited from active::serialise::xml::XMLSolidPolygon< Vert, VertWrap > | |
| enum | FieldIndex { vertex , topID } |
| Serialisation fields. | |
| using | base = std::reference_wrapper<geometry::Polygon> |
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 | |
| XMLPolygon (const geometry::Polygon &polygon) | |
| XMLPolygon (const geometry::Polygon &polygon, const utility::String &customTag) | |
| virtual bool | fillInventory (Inventory &inventory) const override |
| virtual Cargo::Unique | getCargo (const Inventory::Item &item) const override |
| virtual bool | insert (Cargo::Unique &&cargo, const Inventory::Item &item) override |
Public Member Functions inherited from active::serialise::xml::XMLSolidPolygon< Vert, VertWrap > | |
| XMLSolidPolygon (const geometry::Polygon &polygon) | |
| XMLSolidPolygon (const geometry::Polygon &polygon, const utility::String &customTag) | |
| virtual void | setDefault () override |
| virtual bool | validate () override |
Public Member Functions inherited from active::serialise::Package | |
| bool | isRoot () const |
| virtual bool | isAttributeFirst () const |
| 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 void | clear () |
Static Public Attributes | |
| static utility::String | tag = "polygon" |
| The default element tag. | |
| static std::array | fieldID |
| Serialisation field IDs. | |
Static Public Attributes inherited from active::serialise::xml::XMLSolidPolygon< Vert, VertWrap > | |
| static utility::String | tag = "polygon" |
| The default element tag. | |
| static std::array | fieldID |
| Serialisation field IDs. | |
A serialisation wrapper for a Polygon (includng holes)
While explicitly supporting XML, this class should work equally well for JSON and probably CSV serialisation This is a template to support the deserialisation of vertex objects derived from PolyPoint
|
inline |
Constructor
| polygon | The polygon to wrap for (de)serialisation |
|
inline |
Constructor
| polygon | The polygon to wrap for (de)serialisation |
| customTag | A custom tag (overrides the default tag) |
|
inlineoverridevirtual |
Fill an inventory with the package items
| inventory | The inventory to receive the package items |
Reimplemented from active::serialise::xml::XMLSolidPolygon< Vert, VertWrap >.

|
inlineoverridevirtual |
Get the specified cargo
| item | The inventory item to retrieve |
Reimplemented from active::serialise::xml::XMLSolidPolygon< Vert, VertWrap >.

|
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::xml::XMLSolidPolygon< Vert, VertWrap >.

|
inlinestatic |
Serialisation field IDs.