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

Protected Attributes

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

Additional Inherited Members

- Public Attributes inherited from CustomUnit
String id
 
TranslatedString name
 
UnitCategory unit_type
 

Detailed Description

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


Class: BaseValues

Constructor & Destructor Documentation

◆ BasicCustomUnit()

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

Member Function Documentation

◆ defaultUnit()

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

Implements CustomUnit.

◆ finishReadingINI()

virtual void finishReadingINI ( UnitManager & manager)
overridevirtual

Reimplemented from CustomUnit.

◆ options()

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

Implements CustomUnit.

◆ prepareForINI()

virtual void prepareForINI ( const UnitManager & manager)
overridevirtual

Reimplemented from CustomUnit.

◆ setupINI()

virtual void setupINI ( INIFactory & ini)
overridevirtual

Implements CustomUnit.

◆ title()

virtual TranslatedString title ( ) const
inlinenodiscardoverridevirtual

Reimplemented from CustomUnit.

◆ unitResource()

virtual 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 file: