MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / convertStringToPropertyType

Function convertStringToPropertyType

CesiumGltf/src/PropertyType.cpp:40–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40PropertyType convertStringToPropertyType(const std::string& str) {
41 if (str == ClassProperty::Type::SCALAR) {
42 return PropertyType::Scalar;
43 }
44
45 if (str == ClassProperty::Type::VEC2) {
46 return PropertyType::Vec2;
47 }
48
49 if (str == ClassProperty::Type::VEC3) {
50 return PropertyType::Vec3;
51 }
52
53 if (str == ClassProperty::Type::VEC4) {
54 return PropertyType::Vec4;
55 }
56
57 if (str == ClassProperty::Type::MAT2) {
58 return PropertyType::Mat2;
59 }
60
61 if (str == ClassProperty::Type::MAT3) {
62 return PropertyType::Mat3;
63 }
64
65 if (str == ClassProperty::Type::MAT4) {
66 return PropertyType::Mat4;
67 }
68
69 if (str == ClassProperty::Type::BOOLEAN) {
70 return PropertyType::Boolean;
71 }
72
73 if (str == ClassProperty::Type::STRING) {
74 return PropertyType::String;
75 }
76
77 if (str == ClassProperty::Type::ENUM) {
78 return PropertyType::Enum;
79 }
80
81 return PropertyType::Invalid;
82}
83
84PropertyType convertAccessorTypeToPropertyType(const std::string& type) {
85 if (type == AccessorSpec::Type::SCALAR) {

Callers 15

getPropertyViewMethod · 0.85
getPropertyViewMethod · 0.85
createPropertyViewMethod · 0.85
validatePropertyTypeFunction · 0.85
PropertyViewMethod · 0.85
PropertyViewMethod · 0.85
PropertyViewMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected