| 284 | |
| 285 | void ValueSchemaRegistry::setListener(const Ref<ValueSchemaRegistryListener>& listener) { |
| 286 | auto guard = lock(); |
| 287 | _listener = listener; |
| 288 | } |
| 289 | |
| 290 | std::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; |