20 #define thisTTClass CentimeterUnit
21 #define thisTTClassName "unit.centimeter"
22 #define thisTTClassTags "dataspace.unit, distance"
28 CentimeterUnit::~CentimeterUnit(){;}
47 #undef thisTTClassName
48 #undef thisTTClassTags
52 #define thisTTClass FootUnit
53 #define thisTTClassName "unit.foot"
54 #define thisTTClassTags "dataspace.unit, distance"
60 FootUnit::~FootUnit(){;}
79 #undef thisTTClassName
80 #undef thisTTClassTags
84 #define thisTTClass InchUnit
85 #define thisTTClassName "unit.inch"
86 #define thisTTClassTags "dataspace.unit, distance"
92 InchUnit::~InchUnit(){;}
111 #undef thisTTClassName
112 #undef thisTTClassTags
116 #define thisTTClass MeterUnit
117 #define thisTTClassName "unit.meter"
118 #define thisTTClassTags "dataspace.unit, distance"
124 MeterUnit::~MeterUnit(){;}
139 #undef thisTTClassName
140 #undef thisTTClassTags
144 #define thisTTClass DistanceDataspace
145 #define thisTTClassName "dataspace.distance"
146 #define thisTTClassTags "foundationDataspaceLib, dataspace, distance"
151 registerUnit(
TT(
"unit.centimeter"),
TT(
"cm"));
152 registerUnit(
TT(
"unit.centimeter"),
TT(
"centimeters"));
153 registerUnit(
TT(
"unit.foot"),
TT(
"'"));
154 registerUnit(
TT(
"unit.foot"),
TT(
"feet"));
155 registerUnit(
TT(
"unit.inch"),
TT(
"\""));
156 registerUnit(
TT(
"unit.inch"),
TT(
"inches"));
157 registerUnit(
TT(
"unit.meter"),
TT(
"m"));
158 registerUnit(
TT(
"unit.meter"),
TT(
"meters"));
161 neutralUnit =
TT(
"meters");
164 setInputUnit(neutralUnit);
165 setOutputUnit(neutralUnit);
169 DistanceDataspace::~DistanceDataspace()
175 #undef thisTTClassName
176 #undef thisTTClassTags
void convertToNeutral(const TTValue &input, TTValue &output)
Convert from centimeter to neutral unit.
double TTFloat64
64 bit floating point number
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void convertFromNeutral(const TTValue &input, TTValue &output)
Convert from neutral unit to meters.
The DistanceDataspace converts between different measurement untis describing distance.
Specification for the base class of each DataspaceUnit.
void convertFromNeutral(const TTValue &input, TTValue &output)
Convert from neutral unit to centimeter.
void convertToNeutral(const TTValue &input, TTValue &output)
Convert from inches to neutral unit.
TT_OBJECT_CONSTRUCTOR
Constructor macro.
void convertToNeutral(const TTValue &input, TTValue &output)
Convert from meters to neutral unit.
[doxygenAppendixC_copyExample]
void convertFromNeutral(const TTValue &input, TTValue &output)
Convert from neutral unit to inches.