![]() |
NDEVR
API Documentation
|
A unit that mirrors another set unit. More...
Public Member Functions | |
| ReferenceCustomUnit (const StringView &id, const TranslatedString &name, UnitCategory unit_type) | |
| Constructs a ReferenceCustomUnit with the given identifier, name, and unit category. | |
| virtual | ~ReferenceCustomUnit () |
| Virtual destructor. | |
| virtual ConstPointer< Unit > | currentUnit (UnitManager &manager) override |
| Returns the current unit from the referenced source. | |
| virtual ConstPointer< Unit > | defaultUnit (UnitManager &) const override |
| Returns the default unit from the referenced source. | |
| virtual void | finishReadingINI (UnitManager &) override |
| No-op for reference units since INI state is managed by the referenced source. | |
| virtual Buffer< ConstPointer< UnitOption > > | options (UnitManager &manager) const override |
| Returns the available unit options from the referenced source. | |
| virtual void | prepareForINI (const UnitManager &) override |
| No-op for reference units since INI state is managed by the referenced source. | |
| virtual void | resetToDefault (UnitManager &) override |
| Resets this reference unit to its default value. | |
| virtual void | setupINI (INIFactory &) override |
| No-op for reference units since INI state is managed by the referenced source. | |
| virtual Resource< ConstPointer< Unit > > & | unitResource (UnitManager &manager) override |
| Returns the unit resource from the referenced manager source. | |
| Public Member Functions inherited from CustomUnit | |
| CustomUnit (const StringView &id, const TranslatedString &name, UnitCategory unit_type) | |
| Constructs a CustomUnit with the given identifier, name, and unit category. | |
| virtual | ~CustomUnit () |
| Virtual destructor. | |
| virtual ConstPointer< Unit > | currentUnit () |
| Returns the current unit without a manager context. | |
| virtual TranslatedString | title () const |
| Returns the translated display title. | |
Additional Inherited Members | |
| Public Attributes inherited from CustomUnit | |
| String | id |
| The unique string identifier of this custom unit. | |
| TranslatedString | name |
| The translated display name of this custom unit. | |
| UnitCategory | unit_type |
| The category of unit this custom unit belongs to. | |
A unit that mirrors another set unit.
Class: BaseValues
Definition at line 235 of file UnitManager.h.
|
inline |
Constructs a ReferenceCustomUnit with the given identifier, name, and unit category.
| [in] | id | The unique string identifier for this reference unit. |
| [in] | name | The translated display name for this reference unit. |
| [in] | unit_type | The category of unit this reference unit mirrors. |
Definition at line 244 of file UnitManager.h.
References CustomUnit::CustomUnit(), CustomUnit::id, CustomUnit::name, and CustomUnit::unit_type.
|
overridevirtual |
Returns the current unit from the referenced source.
| [in] | manager | The UnitManager providing unit context. |
Reimplemented from CustomUnit.
|
nodiscardoverridevirtual |
Returns the default unit from the referenced source.
| [in] | manager | The UnitManager providing unit context. |
Implements CustomUnit.
|
nodiscardoverridevirtual |
Returns the available unit options from the referenced source.
| [in] | manager | The UnitManager providing unit context. |
Implements CustomUnit.
|
overridevirtual |
Resets this reference unit to its default value.
| [in] | manager | The UnitManager providing unit context. |
Reimplemented from CustomUnit.
|
nodiscardoverridevirtual |
Returns the unit resource from the referenced manager source.
| [in] | manager | The UnitManager providing unit context. |
Implements CustomUnit.