MCPcopy Create free account
hub / github.com/MihailRis/voxelcore / parse

Method parse

src/objects/rigging.cpp:157–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157std::unique_ptr<SkeletonConfig> SkeletonConfig::parse(
158 std::string_view src,
159 std::string_view file,
160 std::string_view name
161) {
162 auto root = json::parse(file, src);
163 auto rootNodeMap = root->map("root");
164 if (rootNodeMap == nullptr) {
165 throw std::runtime_error("missing 'root' element");
166 }
167 auto [count, rootNode] = read_node(rootNodeMap, 0);
168 return std::make_unique<SkeletonConfig>(std::string(name), std::move(rootNode), count);
169}

Callers

nothing calls this directly

Calls 2

read_nodeFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected