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

Method getAllSchemas

valdi_core/src/valdi_core/cpp/Schema/ValueSchemaRegistry.cpp:286–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285void ValueSchemaRegistry::setListener(const Ref<ValueSchemaRegistryListener>& listener) {
286 auto guard = lock();
287 _listener = listener;
288}
289
290std::vector<ValueSchema> ValueSchemaRegistry::getAllSchemas() const {
291 std::lock_guard<std::recursive_mutex> guard(_mutex);
292
293 std::vector<ValueSchema> schemas;
294 schemas.reserve(_entries.size());
295 for (const auto& entry : _entries) {
296 if (entry.reference == nullptr) {
297 continue;
298 }
299 schemas.emplace_back(entry.schema);
300 }
301 return schemas;

Callers 2

TESTFunction · 0.80
TEST_FFunction · 0.80

Calls 2

reserveMethod · 0.45
sizeMethod · 0.45

Tested by 2

TESTFunction · 0.64
TEST_FFunction · 0.64