1#include <Core/RaCore.hpp>
2#include <Core/Utils/StringUtils.hpp>
3#include <Core/Utils/TypesUtils.hpp>
11namespace TypeInternal {
18#ifndef CORE_USE_DOUBLE
19 {
"float",
"Scalar" },
21 {
"double",
"Scalar" },
23 {
", std::allocator<float>",
"" },
24 {
", std::allocator<double>",
"" },
25 {
", std::allocator<int>",
"" },
26 {
", std::allocator<unsigned int>",
"" },
27 {
"Ra::Core::VectorArray",
"RaVector" },
28 {
"Ra::Core::Utils::ColorBase<float>",
"Color" },
29 {
"Ra::Core::Utils::ColorBase<double>",
"Color" },
30 {
"Eigen::Matrix<float, 2, 1, 0, 2, 1>",
"Vector2" },
31 {
"Eigen::Matrix<double, 2, 1, 0, 2, 1>",
"Vector2d" },
32 {
"Eigen::Matrix<int, 2, 1, 0, 2, 1>",
"Vector2i" },
33 {
"Eigen::Matrix<unsigned int, 2, 1, 0, 2, 1>",
"Vector2ui" },
34 {
"Eigen::Matrix<float, 3, 1, 0, 3, 1>",
"Vector3" },
35 {
"Eigen::Matrix<double, 3, 1, 0, 3, 1>",
"Vector3d" },
36 {
"Eigen::Matrix<int, 3, 1, 0, 3, 1>",
"Vector3i" },
37 {
"Eigen::Matrix<unsigned int, 3, 1, 0, 3, 1>",
"Vector3ui" },
38 {
"Eigen::Matrix<float, 4, 1, 0, 4, 1>",
"Vector4" },
39 {
"Eigen::Matrix<double, 4, 1, 0, 4, 1>",
"Vector4d" },
40 {
"Eigen::Matrix<int, 4, 1, 0, 4, 1>",
"Vector4i" },
41 {
"Eigen::Matrix<unsigned int, 4, 1, 0, 4, 1>",
"Vector4ui" },
45 {
"basic_string<char, char_traits<char>, allocator<char>>",
"string" } };
47 auto result = fullType;
48 for (
const auto& [key, value] : knownTypes ) {
49 Ra::Core::Utils::replaceAllInString( result, key, value );
53 remove_bracket_block( result,
"allocator" );
54 remove_bracket_block( result,
"char_traits" );
55 remove_bracket_block( result,
"hash" );
56 remove_bracket_block( result,
"equal_to" );
hepler function to manage enum as underlying types in VariableSet
T regex_replace(T... args)