vcsl_length_unit.cxx
Go to the documentation of this file.
1 // This is core/vcsl/vcsl_length_unit.cxx
2 #include "vcsl_length_unit.h"
3 #include <vcsl/vcsl_meter.h>
4 
5 //---------------------------------------------------------------------------
6 // Are `this' and `other' compatible units ? (Are they associated to the
7 // same dimension ?)
8 //---------------------------------------------------------------------------
10 {
11  return other->cast_to_length_unit()!=nullptr;
12 }
13 
14 //---------------------------------------------------------------------------
15 // Return the standard unit associated to the dimension of `this'
16 //---------------------------------------------------------------------------
18 {
19  return vcsl_meter::instance().ptr();
20 }
Standard unit associated to the length dimension.
vcsl_unit_sptr standard_unit() const override
Return the standard unit associated to the dimension of ‘this’.
bool compatible_units(vcsl_unit_sptr const &other) const override
Are ‘this’ and ‘other’ compatible units ?.
static vcsl_meter_sptr instance()
Return the reference to the unique vcsl_meter object.
Definition: vcsl_meter.cxx:7
Abstract unit associated to the length dimension.
T * ptr() const