1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-09-27 22:16:21 +00:00

Implements BSON deserialisation, other than arrays.

This commit is contained in:
Thomas Harte
2020-05-25 23:39:00 -04:00
parent c83c827484
commit 4d34d9ae2b
3 changed files with 207 additions and 9 deletions

View File

@@ -72,6 +72,14 @@ class MultiStruct: public Reflection::Struct {
return nullptr;
}
void *get(const std::string &name) final {
for(auto &options: options_) {
auto value = options->get(name);
if(value) return value;
}
return nullptr;
}
void set(const std::string &name, const void *value) final {
const auto safe_type = type_of(name);
if(!safe_type) return;