NDEVR
API Documentation
CoordinateUnitOption

A definition of how to describe coordinate data. More...

Inheritance diagram for CoordinateUnitOption:
[legend]
Collaboration diagram for CoordinateUnitOption:
[legend]

Public Member Functions

 CoordinateUnitOption (const StringView &id, const TranslatedString &name)
 Constructs a CoordinateUnitOption with the given identifier and name.
virtual bool hasMemberUnit (const ConstPointer< Unit > &unit) const final override
 Checks whether the given unit is a member of this coordinate option.
virtual ConstPointer< Unitunit () const final override
 Returns the coordinate unit.
virtual ConstPointer< Unitunit (const ConstPointer< Unit > &distance_unit) const final override
 Returns a coordinate unit resolved relative to the given distance unit.
Public Member Functions inherited from UnitOption
 UnitOption (const StringView &id, const TranslatedString &name)
 Constructs a UnitOption with the given identifier and display name.
virtual ~UnitOption ()
 Virtual destructor.
virtual Buffer< ConstPointer< UnitOption > > subOptions () const
 Returns the sub-options contained within this unit option.
virtual TranslatedString title () const
 Returns the translated display title for this unit option.

Additional Inherited Members

Public Attributes inherited from UnitOption
String id
 The unique string identifier of this unit option.
TranslatedString name
 The translated display name of this unit option.

Detailed Description

A definition of how to describe coordinate data.


Definition at line 119 of file UnitManager.h.

Constructor & Destructor Documentation

◆ CoordinateUnitOption()

CoordinateUnitOption::CoordinateUnitOption ( const StringView & id,
const TranslatedString & name )
inline

Constructs a CoordinateUnitOption with the given identifier and name.

Parameters
[in]idThe unique string identifier for this coordinate option.
[in]nameThe translated display name for this coordinate option.

Definition at line 127 of file UnitManager.h.

References UnitOption::UnitOption(), UnitOption::id, and UnitOption::name.

Member Function Documentation

◆ hasMemberUnit()

virtual bool CoordinateUnitOption::hasMemberUnit ( const ConstPointer< Unit > & unit) const
finaloverridevirtual

Checks whether the given unit is a member of this coordinate option.

Parameters
[in]unitThe unit to check membership for.
Returns
True if the unit is a member, false otherwise.

Implements UnitOption.

References hasMemberUnit(), and unit().

Referenced by hasMemberUnit().

◆ unit() [1/2]

virtual ConstPointer< Unit > CoordinateUnitOption::unit ( ) const
finaloverridevirtual

Returns the coordinate unit.

Returns
A const pointer to the unit.

Implements UnitOption.

Referenced by hasMemberUnit(), and unit().

◆ unit() [2/2]

virtual ConstPointer< Unit > CoordinateUnitOption::unit ( const ConstPointer< Unit > & distance_unit) const
finaloverridevirtual

Returns a coordinate unit resolved relative to the given distance unit.

Parameters
[in]distance_unitThe distance unit used to resolve the coordinate unit.
Returns
A const pointer to the resolved coordinate unit.

Reimplemented from UnitOption.

References unit().


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