![]() |
NDEVR
API Documentation
|
A definition of how to describe a particular set of data to a custom category of unit. More...
Public Member Functions | |
| UnitOption (const StringView &id, const TranslatedString &name) | |
| Constructs a UnitOption with the given identifier and display name. | |
| virtual | ~UnitOption () |
| Virtual destructor. | |
| virtual bool | hasMemberUnit (const ConstPointer< Unit > &unit) const =0 |
| Checks whether the given unit is a member of this option. | |
| 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. | |
| virtual ConstPointer< Unit > | unit () const =0 |
| Returns the unit associated with this option. | |
| virtual ConstPointer< Unit > | unit (const ConstPointer< Unit > &) const |
| Returns a unit resolved relative to the given unit context. | |
Public Attributes | |
| String | id |
| The unique string identifier of this unit option. | |
| TranslatedString | name |
| The translated display name of this unit option. | |
A definition of how to describe a particular set of data to a custom category of unit.
Definition at line 17 of file UnitManager.h.
|
inline |
Constructs a UnitOption with the given identifier and display name.
| [in] | id | The unique string identifier for this unit option. |
| [in] | name | The translated display name for this unit option. |
Definition at line 25 of file UnitManager.h.
Referenced by BasicUnitOption::BasicUnitOption(), and CoordinateUnitOption::CoordinateUnitOption().
|
pure virtual |
Checks whether the given unit is a member of this option.
| [in] | unit | The unit to check membership for. |
Implemented in BasicUnitOption, and CoordinateUnitOption.
References unit().
|
inlinevirtual |
Returns the sub-options contained within this unit option.
Reimplemented in BasicUnitOption.
Definition at line 59 of file UnitManager.h.
|
inlinevirtual |
Returns the translated display title for this unit option.
Reimplemented in BasicUnitOption.
Definition at line 37 of file UnitManager.h.
References name.
|
pure virtual |
Returns the unit associated with this option.
Implemented in BasicUnitOption, and CoordinateUnitOption.
Referenced by hasMemberUnit().
|
inlinevirtual |
Returns a unit resolved relative to the given unit context.
| [in] | unit | The unit to use as context for resolution. |
Reimplemented in CoordinateUnitOption.
Definition at line 54 of file UnitManager.h.
References unit().
Referenced by unit().