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

A definition of how to describe and display data. Units can be of any type. More...

#include <Unit.h>

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

Public Member Functions

virtual const TranslatedStringabbreviation (uint01 direction=X) const =0
 
virtual Unitclone () const
 
virtual Unitclone (const String &new_name, const TranslatedString &new_display_name) const =0
 
template<class t_angle_type >
Angle< t_angle_type > convertAngleFromUnit (const fltp08 &unit_space, uint01 direction=X) const
 
virtual fltp08 convertFromString (const String &unit_string, uint01 direction=X) const
 
virtual fltp08 convertFromUnit (const fltp08 &unit_space, const uint01 direction=X) const =0
 
virtual Ray< 3, fltp08convertFromUnit (const Ray< 3, fltp08 > &unit_space) const =0
 
virtual Vertex< 3, fltp08convertFromUnit (const Vertex< 3, fltp08 > &unit_space) 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
 
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
 
template<class t_angle_type >
fltp08 convertToUnit (const Angle< t_angle_type > &program_space, uint01 direction=X) const
 
virtual fltp08 convertToUnit (const fltp08 &program_space, const uint01 direction=X) const =0
 
virtual Ray< 3, fltp08convertToUnit (const Ray< 3, fltp08 > &program_space) const =0
 
virtual Vertex< 3, fltp08convertToUnit (const Vertex< 3, fltp08 > &program_space) const =0
 
virtual fltp08 epsilon (fltp08 value, uint01 direction=X) const
 
virtual fltp08 fromString (const String &unit_string, uint01 direction=X) const
 
virtual String getNextPreferredSeparator (const String &current_string, uint01 direction=X) const
 
virtual Matrix< fltp08matrix () const =0
 
bool operator== (const Unit &other) const
 
virtual const UnitsubUnit (uint01 direction) const =0
 
virtual String toFormula (const String &unit_string, 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 TranslatedString translatedAxisName (uint04 index) const
 
TranslatedString translatedName () const
 
 Unit (String name, TranslatedString translated_id)
 
virtual ~Unit ()=default
 

Public Attributes

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

Static Protected Member Functions

static Buffer< StringOperatorSplit (const String &string)
 

Detailed Description

A definition of how to describe and display data. Units can be of any type.


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]

virtual 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()

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

◆ fromString()

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

◆ getNextPreferredSeparator()

virtual 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()

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

◆ subUnit()

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

◆ toFormula()

virtual 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()

virtual TranslatedString translatedAxisName ( uint04 index) const
nodiscardvirtual

Reimplemented in LocationElevationUnit.

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