Skip to content
Snippets Groups Projects

Rename ARON numeric primitive typenames

Merged Fabian Tërnava requested to merge aron/dev into master
3 files
+ 43
19
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -97,10 +97,10 @@ namespace armarx::aron::typereader::xml
const std::string QUATERNION_TAG = "quaternion";
const std::string IMAGE_TAG = "image";
const std::string POINT_CLOUD_TAG = "pointcloud";
const std::string INT_TAG = "int";
const std::string LONG_TAG = "long";
const std::string FLOAT_TAG = "float";
const std::string DOUBLE_TAG = "double";
const std::string INT_TAG = "int32";
const std::string LONG_TAG = "int64";
const std::string FLOAT_TAG = "float32";
const std::string DOUBLE_TAG = "float64";
const std::string STRING_TAG = "string";
const std::string BOOL_TAG = "bool";
const std::string ANY_OBJECT_TAG = "anyobject";
@@ -108,21 +108,32 @@ namespace armarx::aron::typereader::xml
// others
const std::vector<std::string> WHATEVER_VALUES = {"?"};
// Replacements ({tagName, {replacementsTag, additionalAronDTOXMLIncludePackagePath}})
const std::map<std::string, std::pair<std::string, std::pair<std::string, std::string>>> REPLACEMENTS =
struct Replacement
{
{"position", {"<matrix rows='3' cols='1' type='float32' />", {}}},
{"pose", {"<matrix rows='4' cols='4' type='float32' />", {}}},
{"orientation", {"<quaternion type='float32' />", {}}},
std::string replacementTag;
std::pair<std::string, std::string> additionalAronDTOXMLIncludePackagePath;
std::string deprecatedWarning;
};
// Replacements ({tagName, {replacementsTag, additionalAronDTOXMLIncludePackagePath}, deprecationwarning})
const std::map<std::string, Replacement> REPLACEMENTS =
{
{"int", {"<int32 />", {}, "The <int />-tag is deprecated. Please use <int32 /> instead."}},
{"long", {"<int64 />", {}, "The <long />-tag is deprecated. Please use <int64 /> instead."}},
{"float", {"<float32 />", {}, "The <float />-tag is deprecated. Please use <float32 /> instead."}},
{"double", {"<float64 />", {}, "The <double />-tag is deprecated. Please use <double32 /> instead."}},
{"position", {"<matrix rows='3' cols='1' type='float32' />", {}, ""}},
{"pose", {"<matrix rows='4' cols='4' type='float32' />", {}, ""}},
{"orientation", {"<quaternion type='float32' />", {}, ""}},
// You can also add replacements for arondtos here!
// structure: {xml-identifier, {replacement, auto-include}}
{"datetime", {"<armarx::arondto::DateTime />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}}},
{"time", {"<armarx::arondto::DateTime />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}}},
{"duration", {"<armarx::arondto::Duration />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}}},
{"framedposition", {"<armarx::arondto::FramedPosition />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}}},
{"framedorientation", {"<armarx::arondto::FramedOrientation />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}}},
{"framedpose", {"<armarx::arondto::FramedPose />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}}}
// structure: {xml-identifier, {replacement, auto-include}, deprecationwarning}
{"datetime", {"<armarx::arondto::DateTime />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}, ""}},
{"time", {"<armarx::arondto::DateTime />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}, ""}},
{"duration", {"<armarx::arondto::Duration />", {"RobotAPI", "libraries/aron/common/aron/time.xml"}, ""}},
{"framedposition", {"<armarx::arondto::FramedPosition />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}, ""}},
{"framedorientation", {"<armarx::arondto::FramedOrientation />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}, ""}},
{"framedpose", {"<armarx::arondto::FramedPose />", {"RobotAPI", "libraries/aron/common/aron/framed.xml"}, ""}}
};
}
Loading