API Documentation
Loading...
Searching...
No Matches
CustomUnit Class Referenceabstract

A program-defined unit that can be used for some specific task different from a program-wide unit. More...

#include <UnitManager.h>

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

Public Member Functions

 CustomUnit (const String &id, const TranslatedString &name, UnitType unit_type)
 
virtual ~CustomUnit ()
 
virtual TranslatedString title () const
 
virtual Resource< ConstPointer< Unit > > & unitResource (UnitManager &manager)=0
 
virtual Buffer< ConstPointer< UnitOption > > options (UnitManager &manager) const =0
 
virtual void prepareForINI (const UnitManager &)
 
virtual void setupINI (INIFactory &)=0
 
virtual void resetToDefault (UnitManager &)
 
virtual void finishReadingINI (UnitManager &)
 
virtual ConstPointer< UnitcurrentUnit ()
 
virtual ConstPointer< UnitcurrentUnit (UnitManager &manager)
 
virtual ConstPointer< UnitdefaultUnit (UnitManager &) const =0
 

Public Attributes

TranslatedString name
 
String id
 
UnitType unit_type
 

Detailed Description

A program-defined unit that can be used for some specific task different from a program-wide unit.


Class: BaseValues

autotoc_md579

Constructor & Destructor Documentation

◆ CustomUnit()

CustomUnit ( const String & id,
const TranslatedString & name,
UnitType unit_type )
inline

◆ ~CustomUnit()

virtual ~CustomUnit ( )
inlinevirtual

Member Function Documentation

◆ currentUnit() [1/2]

ConstPointer< Unit > currentUnit ( )
virtual

◆ currentUnit() [2/2]

ConstPointer< Unit > currentUnit ( UnitManager & manager)
virtual

Reimplemented in ReferenceCustomUnit.

◆ defaultUnit()

virtual ConstPointer< Unit > defaultUnit ( UnitManager & ) const
nodiscardpure virtual

Implemented in BasicCustomUnit, and ReferenceCustomUnit.

◆ finishReadingINI()

virtual void finishReadingINI ( UnitManager & )
inlinevirtual

Reimplemented in BasicCustomUnit, and ReferenceCustomUnit.

◆ options()

virtual Buffer< ConstPointer< UnitOption > > options ( UnitManager & manager) const
nodiscardpure virtual

Implemented in BasicCustomUnit, and ReferenceCustomUnit.

◆ prepareForINI()

virtual void prepareForINI ( const UnitManager & )
inlinevirtual

Reimplemented in BasicCustomUnit, and ReferenceCustomUnit.

◆ resetToDefault()

void resetToDefault ( UnitManager & manager)
virtual

Reimplemented in ReferenceCustomUnit.

◆ setupINI()

virtual void setupINI ( INIFactory & )
pure virtual

Implemented in BasicCustomUnit, and ReferenceCustomUnit.

◆ title()

virtual TranslatedString title ( ) const
inlinenodiscardvirtual

Reimplemented in BasicCustomUnit.

◆ unitResource()

virtual Resource< ConstPointer< Unit > > & unitResource ( UnitManager & manager)
nodiscardpure virtual

Implemented in BasicCustomUnit, and ReferenceCustomUnit.

Member Data Documentation

◆ id

String id

◆ name

◆ unit_type

UnitType unit_type

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