core/vcsl/vcsl_length_unit.cxx
Go to the documentation of this file.
00001 // This is core/vcsl/vcsl_length_unit.cxx
00002 #include "vcsl_length_unit.h"
00003 #include <vcsl/vcsl_meter.h>
00004 
00005 //---------------------------------------------------------------------------
00006 // Are `this' and `other' compatible units ? (Are they associated to the
00007 // same dimension ?)
00008 //---------------------------------------------------------------------------
00009 bool vcsl_length_unit::compatible_units(vcsl_unit_sptr const& other) const
00010 {
00011   return other->cast_to_length_unit()!=0;
00012 }
00013 
00014 //---------------------------------------------------------------------------
00015 // Return the standard unit associated to the dimension of `this'
00016 //---------------------------------------------------------------------------
00017 vcsl_unit_sptr vcsl_length_unit::standard_unit() const
00018 {
00019   return vcsl_meter::instance().ptr();
00020 }