LuciadCPillar 2023.1.04
luciad::MilitarySymbologyNode Class Referenceabstract

Representation of a military symbol. More...

#include <luciad/symbology/military/MilitarySymbologyNode.h>

Classes

class  SymbolTypes
 Allows enumerating SymbolTypes values and converting them to and from std::string. More...
 

Public Types

enum class  SymbolType { Icon , Shape }
 Describes how a military symbol is represented. More...
 

Public Member Functions

virtual ~MilitarySymbologyNode ()=default
 
virtual std::shared_ptr< luciad::GeometrycreateTemplate (std::shared_ptr< luciad::CoordinateReference > crs, double x, double y, double size) const =0
 Creates a suitable geometry for this symbology node, at the given location and of the provided size. More...
 
virtual const std::vector< std::shared_ptr< MilitarySymbologyNode > > & getChildren () const =0
 Returns the child nodes of this node. More...
 
virtual const std::optional< std::string > & getCode () const =0
 Returns the identifier uniquely defining the symbol, or std::nullopt if the node does not represent a symbol. More...
 
virtual std::optional< size_t > getMaximumPointCount () const =0
 Returns the maximum number of points that a shape representing this node should have. More...
 
virtual size_t getMinimumPointCount () const =0
 Returns the minimum number of points that a shape representing this node should have. More...
 
virtual const std::string & getName () const =0
 Returns the descriptive name for this symbol. More...
 
virtual std::shared_ptr< MilitarySymbologyNodegetParent () const =0
 Returns the parent of this node, or a nullptr value if this node is a root node. More...
 
virtual std::optional< SymbolTypegetSymbolType () const =0
 Returns the current type of symbol, can either be a shape or and icon or std::nullopt if the node does not represent a symbol. More...
 
virtual bool isFolderOnly () const =0
 

Detailed Description

Representation of a military symbol.

Member Enumeration Documentation

◆ SymbolType

Describes how a military symbol is represented.

See SymbolTypes to enumerate all values and convert them to and from std::string.

Enumerator
Icon 

The symbol is represented by a single icon.

Shape 

The symbol is represented by a (non-icon) shape.

Constructor & Destructor Documentation

◆ ~MilitarySymbologyNode()

virtual luciad::MilitarySymbologyNode::~MilitarySymbologyNode ( )
virtualdefault

Member Function Documentation

◆ createTemplate()

virtual std::shared_ptr< luciad::Geometry > luciad::MilitarySymbologyNode::createTemplate ( std::shared_ptr< luciad::CoordinateReference crs,
double  x,
double  y,
double  size 
) const
pure virtual

Creates a suitable geometry for this symbology node, at the given location and of the provided size.

This can be used as a convenience for programmatically creating geometries. The returned geometry can be a point, polyline or polygon.

Parameters
crsthe coordinate reference of the geometry.
xthe x-coordinate where the template will be created.
ythe y-coordinate where the template will be created.
sizethe approximate size of the final template, in the units of the given coordinate reference system.
Returns
a geometry that can represent the symbol of this node, or nullptr if this node does not represent a symbol.

◆ getChildren()

virtual const std::vector< std::shared_ptr< MilitarySymbologyNode > > & luciad::MilitarySymbologyNode::getChildren ( ) const
pure virtual

Returns the child nodes of this node.

Empty if this node is a leaf node.

Returns
the child nodes of this node.

◆ getCode()

virtual const std::optional< std::string > & luciad::MilitarySymbologyNode::getCode ( ) const
pure virtual

Returns the identifier uniquely defining the symbol, or std::nullopt if the node does not represent a symbol.

Returns
the identifier uniquely defining the symbol, or std::nullopt if the node does not represent a symbol.

◆ getMaximumPointCount()

virtual std::optional< size_t > luciad::MilitarySymbologyNode::getMaximumPointCount ( ) const
pure virtual

Returns the maximum number of points that a shape representing this node should have.

If there is no restriction in the number of points or if the node is represented by an icon or does not represent a symbol at all, this returns std::nullopt.

Returns
the maximum number of points that a shape representing this node should have.

◆ getMinimumPointCount()

virtual size_t luciad::MilitarySymbologyNode::getMinimumPointCount ( ) const
pure virtual

Returns the minimum number of points that a shape representing this node should have.

Returns
the minimum number of points that a shape representing this node should have.

◆ getName()

virtual const std::string & luciad::MilitarySymbologyNode::getName ( ) const
pure virtual

Returns the descriptive name for this symbol.

Returns
the descriptive name for this symbol.

◆ getParent()

virtual std::shared_ptr< MilitarySymbologyNode > luciad::MilitarySymbologyNode::getParent ( ) const
pure virtual

Returns the parent of this node, or a nullptr value if this node is a root node.

Returns
the parent of this node, or a nullptr value if this node is a root node.

◆ getSymbolType()

virtual std::optional< SymbolType > luciad::MilitarySymbologyNode::getSymbolType ( ) const
pure virtual

Returns the current type of symbol, can either be a shape or and icon or std::nullopt if the node does not represent a symbol.

Returns
the current type of symbol, can either be a shape or and icon or std::nullopt if the node does not represent a symbol.

◆ isFolderOnly()

virtual bool luciad::MilitarySymbologyNode::isFolderOnly ( ) const
pure virtual
Returns
if this node is a folder-only node, i.e. if it doesn't represent a symbol.