MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / stringToUnits

Function stringToUnits

src/Core/Transform/Units.cpp:6–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace obe::Transform
5{
6 Units stringToUnits(const std::string& unit)
7 {
8 if (unit == "ViewPercentage")
9 return Units::ViewPercentage;
10 if (unit == "ViewPixels")
11 return Units::ViewPixels;
12 if (unit == "ViewUnits")
13 return Units::ViewUnits;
14 if (unit == "ScenePixels")
15 return Units::ScenePixels;
16 if (unit == "SceneUnits")
17 return Units::SceneUnits;
18 throw Exceptions::UnknownUnit(unit, EXC_INFO);
19 }
20
21 std::string unitsToString(Units unit)
22 {

Callers 3

loadMethod · 0.85
loadMethod · 0.85
loadMethod · 0.85

Calls 1

UnknownUnitClass · 0.85

Tested by

no test coverage detected