ActiveLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
active::serialise::xml::XMLPolyPoint Class Reference

#include <XMLPolyPoint.h>

Inheritance diagram for active::serialise::xml::XMLPolyPoint:
Inheritance graph
[legend]
Collaboration diagram for active::serialise::xml::XMLPolyPoint:
Collaboration graph
[legend]

Public Types

using base = XMLPoint
 
- Public Types inherited from active::serialise::xml::XMLPoint
using base = std::reference_wrapper<geometry::Point>
 
- 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

 XMLPolyPoint (geometry::PolyPoint &point)
 
 XMLPolyPoint (geometry::PolyPoint &point, const utility::String &customTag)
 
virtual bool fillInventory (Inventory &inventory) const override
 
virtual Cargo::Unique getCargo (const Inventory::Item &item) const override
 
virtual void setDefault () override
 
- Public Member Functions inherited from active::serialise::xml::XMLPoint
 XMLPoint (geometry::Point &point)
 
 XMLPoint (geometry::Point &point, const utility::String &customTag)
 
- Public Member Functions inherited from active::serialise::Package
bool isRoot () const
 
virtual bool isAttributeFirst () const
 
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 void clear ()
 
virtual bool validate ()
 

Static Public Attributes

static utility::String tag
 The element tag.
 
- Static Public Attributes inherited from active::serialise::xml::XMLPoint
static utility::String tag = "point"
 The element tag.
 

Detailed Description

A serialisation wrapper for a PolyPoint, typically used as a Polygon vertex

While explicitly supporting XML, this class should work equally well for JSON and probably CSV serialisation

Constructor & Destructor Documentation

◆ XMLPolyPoint() [1/2]

XMLPolyPoint::XMLPolyPoint ( geometry::PolyPoint & point)

Constructor

Parameters
pointThe poly-point to wrap for (de)serialisation

◆ XMLPolyPoint() [2/2]

XMLPolyPoint::XMLPolyPoint ( geometry::PolyPoint & point,
const utility::String & customTag )

Constructor

Parameters
pointThe poly-point to wrap for (de)serialisation
customTagA custom tag (overrides the default tag)

Member Function Documentation

◆ fillInventory()

bool XMLPolyPoint::fillInventory ( Inventory & inventory) const
overridevirtual

Fill an inventory with the package items

Parameters
inventoryThe inventory to receive the package items
Returns
True if the package has added items to the inventory

Reimplemented from active::serialise::xml::XMLPoint.

Here is the call graph for this function:

◆ getCargo()

Cargo::Unique XMLPolyPoint::getCargo ( const Inventory::Item & item) const
overridevirtual

Get the specified cargo

Parameters
itemThe inventory item to retrieve
Returns
The requested cargo (nullptr on failure)

Reimplemented from active::serialise::xml::XMLPoint.

Here is the call graph for this function:

◆ setDefault()

void XMLPolyPoint::setDefault ( )
overridevirtual

Set to the default package content

Reimplemented from active::serialise::xml::XMLPoint.

Here is the call graph for this function:

The documentation for this class was generated from the following files: