API Documentation
Loading...
Searching...
No Matches
Unit Struct Referenceabstract

#include <Unit.h>

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

Public Member Functions

 Unit (String name, TranslatedString translated_id)
 
virtual ~Unit ()=default
 
virtual fltp08 convertToUnit (const fltp08 &program_space, const uint01 direction=X) const =0
 
virtual fltp08 convertFromUnit (const fltp08 &unit_space, const uint01 direction=X) const =0
 
virtual Vertex< 3, fltp08convertToUnit (const Vertex< 3, fltp08 > &program_space) const =0
 
virtual Vertex< 3, fltp08convertFromUnit (const Vertex< 3, fltp08 > &unit_space) const =0
 
virtual Ray< 3, fltp08convertToUnit (const Ray< 3, fltp08 > &program_space) const =0
 
virtual Ray< 3, fltp08convertFromUnit (const Ray< 3, fltp08 > &unit_space) const =0
 
virtual const TranslatedStringabbreviation (uint01 direction=X) const =0
 
template<class t_angle_type >
String convertToString (const Angle< t_angle_type > &program_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const
 
template<class t_angle_type >
fltp08 convertToUnit (const Angle< t_angle_type > &program_space, uint01 direction=X) const
 
template<class t_angle_type >
Angle< t_angle_type > convertAngleFromUnit (const fltp08 &unit_space, uint01 direction=X) const
 
virtual String convertToString (const fltp08 &program_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const
 
String toString (const fltp08 &unit_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const
 
virtual void toString (String &string, const fltp08 &unit_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const
 
virtual fltp08 convertFromString (const String &unit_string, uint01 direction=X) const
 
virtual fltp08 fromString (const String &unit_string, uint01 direction=X) const
 
TranslatedString translatedName () const
 
virtual TranslatedString translatedAxisName (uint04 index) const
 
virtual String getNextPreferredSeparator (const String &current_string, uint01 direction=X) const
 
virtual String toFormula (const String &unit_string, uint01 direction=X) const
 
virtual fltp08 epsilon (fltp08 value, uint01 direction=X) const
 
virtual const UnitsubUnit (uint01 direction) const =0
 
virtual Matrix< fltp08matrix () const =0
 
bool operator== (const Unit &other) const
 
virtual Unitclone () const
 
virtual Unitclone (const String &new_name, const TranslatedString &new_display_name) const =0
 

Public Attributes

const String name
 
const TranslatedString translated_id
 
TranslatedString axis_name_ids [4]
 
TranslatedString axis_abbreviations [4]
 

Static Protected Member Functions

static Buffer< StringOperatorSplit (const String &string)
 

Constructor & Destructor Documentation

◆ Unit()

Unit ( String name,
TranslatedString translated_id )

◆ ~Unit()

virtual ~Unit ( )
virtualdefault

Member Function Documentation

◆ abbreviation()

virtual const TranslatedString & abbreviation ( uint01 direction = X) const
nodiscardpure virtual

◆ clone() [1/2]

Unit * clone ( ) const
nodiscardvirtual

◆ clone() [2/2]

virtual Unit * clone ( const String & new_name,
const TranslatedString & new_display_name ) const
nodiscardpure virtual

◆ convertAngleFromUnit()

template<class t_angle_type >
Angle< t_angle_type > convertAngleFromUnit ( const fltp08 & unit_space,
uint01 direction = X ) const
inlinenodiscard

◆ convertFromString()

virtual fltp08 convertFromString ( const String & unit_string,
uint01 direction = X ) const
inlinenodiscardvirtual

◆ convertFromUnit() [1/3]

virtual fltp08 convertFromUnit ( const fltp08 & unit_space,
const uint01 direction = X ) const
nodiscardpure virtual

◆ convertFromUnit() [2/3]

virtual Ray< 3, fltp08 > convertFromUnit ( const Ray< 3, fltp08 > & unit_space) const
nodiscardpure virtual

◆ convertFromUnit() [3/3]

virtual Vertex< 3, fltp08 > convertFromUnit ( const Vertex< 3, fltp08 > & unit_space) const
nodiscardpure virtual

◆ convertToString() [1/2]

template<class t_angle_type >
String convertToString ( const Angle< t_angle_type > & program_space,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
bool include_abv = true,
uint01 direction = X ) const
inlinenodiscard

◆ convertToString() [2/2]

virtual String convertToString ( const fltp08 & program_space,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
bool include_abv = true,
uint01 direction = X ) const
inlinenodiscardvirtual

◆ convertToUnit() [1/4]

template<class t_angle_type >
fltp08 convertToUnit ( const Angle< t_angle_type > & program_space,
uint01 direction = X ) const
inlinenodiscard

◆ convertToUnit() [2/4]

virtual fltp08 convertToUnit ( const fltp08 & program_space,
const uint01 direction = X ) const
nodiscardpure virtual

◆ convertToUnit() [3/4]

virtual Ray< 3, fltp08 > convertToUnit ( const Ray< 3, fltp08 > & program_space) const
nodiscardpure virtual

◆ convertToUnit() [4/4]

virtual Vertex< 3, fltp08 > convertToUnit ( const Vertex< 3, fltp08 > & program_space) const
nodiscardpure virtual

◆ epsilon()

fltp08 epsilon ( fltp08 value,
uint01 direction = X ) const
nodiscardvirtual

◆ fromString()

virtual fltp08 fromString ( const String & unit_string,
uint01 direction = X ) const
inlinenodiscardvirtual

◆ getNextPreferredSeparator()

String getNextPreferredSeparator ( const String & current_string,
uint01 direction = X ) const
nodiscardvirtual

◆ matrix()

virtual Matrix< fltp08 > matrix ( ) const
nodiscardpure virtual

◆ operator==()

bool operator== ( const Unit & other) const
inline

◆ OperatorSplit()

Buffer< String > OperatorSplit ( const String & string)
staticprotected

◆ subUnit()

virtual const Unit * subUnit ( uint01 direction) const
nodiscardpure virtual

◆ toFormula()

String toFormula ( const String & unit_string,
uint01 direction = X ) const
nodiscardvirtual

Reimplemented in LocationElevationUnit, and ReferenceUnit.

◆ toString() [1/2]

String toString ( const fltp08 & unit_space,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
bool include_abv = true,
uint01 direction = X ) const
inlinenodiscard

◆ toString() [2/2]

virtual void toString ( String & string,
const fltp08 & unit_space,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
bool include_abv = true,
uint01 direction = X ) const
inlinevirtual

◆ translatedAxisName()

TranslatedString translatedAxisName ( uint04 index) const
nodiscardvirtual

Reimplemented in LocationElevationUnit, and WGS84Unit.

◆ translatedName()

TranslatedString translatedName ( ) const
nodiscard

Member Data Documentation

◆ axis_abbreviations

TranslatedString axis_abbreviations[4]

◆ axis_name_ids

TranslatedString axis_name_ids[4]

◆ name

const String name

◆ translated_id

const TranslatedString translated_id

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