API Documentation
Loading...
Searching...
No Matches
BasicCustomUnit Class Reference

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 BasicCustomUnit:
[legend]
Collaboration diagram for BasicCustomUnit:
[legend]

Public Member Functions

 BasicCustomUnit (const String &name, const TranslatedString &title, UnitType type)
 
virtual void prepareForINI (const UnitManager &manager) override
 
virtual void setupINI (INIFactory &ini) override
 
virtual void finishReadingINI (UnitManager &manager) override
 
virtual TranslatedString title () const override
 
virtual Resource< ConstPointer< Unit > > & unitResource (UnitManager &manager) override
 
Buffer< ConstPointer< UnitOption > > options (UnitManager &manager) const override
 
virtual ConstPointer< UnitdefaultUnit (UnitManager &) const override
 
- Public Member Functions inherited from CustomUnit
 CustomUnit (const String &id, const TranslatedString &name, UnitType unit_type)
 
virtual ~CustomUnit ()
 
virtual void resetToDefault (UnitManager &)
 
virtual ConstPointer< UnitcurrentUnit ()
 
virtual ConstPointer< UnitcurrentUnit (UnitManager &manager)
 

Protected Attributes

TranslatedString m_title
 
String m_ini_unit_name
 
Resource< ConstPointer< Unit > > m_unit
 

Additional Inherited Members

- Public Attributes inherited from CustomUnit
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_md581

Constructor & Destructor Documentation

◆ BasicCustomUnit()

BasicCustomUnit ( const String & name,
const TranslatedString & title,
UnitType type )

Member Function Documentation

◆ defaultUnit()

ConstPointer< Unit > defaultUnit ( UnitManager & manager) const
nodiscardoverridevirtual

Implements CustomUnit.

◆ finishReadingINI()

void finishReadingINI ( UnitManager & manager)
overridevirtual

Reimplemented from CustomUnit.

◆ options()

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

Implements CustomUnit.

◆ prepareForINI()

void prepareForINI ( const UnitManager & manager)
overridevirtual

Reimplemented from CustomUnit.

◆ setupINI()

void setupINI ( INIFactory & ini)
overridevirtual

Implements CustomUnit.

◆ title()

virtual TranslatedString title ( ) const
inlinenodiscardoverridevirtual

Reimplemented from CustomUnit.

◆ unitResource()

Resource< ConstPointer< Unit > > & unitResource ( UnitManager & manager)
nodiscardoverridevirtual

Implements CustomUnit.

Member Data Documentation

◆ m_ini_unit_name

String m_ini_unit_name
protected

◆ m_title

TranslatedString m_title
protected

◆ m_unit

Resource<ConstPointer<Unit> > m_unit
protected

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