MCPcopy Create free account
hub / github.com/Snapchat/Valdi / registerSchema

Method registerSchema

valdi_core/src/valdi_core/cpp/Schema/ValueSchemaRegistry.cpp:179–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179ValueSchemaRegistrySchemaIdentifier ValueSchemaRegistry::registerSchema(const ValueSchema& schema) {
180 if (schema.isClass()) {
181 return registerSchema(schema.getClass()->getClassName(), schema);
182 } else if (schema.isEnum()) {
183 return registerSchema(schema.getEnum()->getName(), schema);
184 }
185
186 SC_ASSERT_FAIL("Invalid schema type");
187 return 0;
188}
189
190ValueSchemaRegistrySchemaIdentifier ValueSchemaRegistry::registerSchema(const StringBox& typeName,
191 const ValueSchema& schema) {

Callers 4

registerClassMethod · 0.45
registerEnumMethod · 0.45
registerSchemaImplFunction · 0.45

Calls 10

isClassMethod · 0.80
isEnumMethod · 0.80
endMethod · 0.65
getClassNameMethod · 0.45
getClassMethod · 0.45
getNameMethod · 0.45
getEnumMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected