Commit 53284a6f authored by Dominik Charousset's avatar Dominik Charousset

Implement deserialization of URI node IDs

parent 68641365
......@@ -133,6 +133,8 @@ public:
// -- constructors, destructors, and assignment operators ------------------
uri_data() = default;
explicit uri_data(uri value);
// -- properties -----------------------------------------------------------
......
......@@ -211,9 +211,14 @@ error node_id::deserialize(deserializer& source) {
data_.reset();
return none;
}
if (impl == atom("default")) {
if (data_ == nullptr || data_->implementation_id() != atom("default"))
data_.reset(new default_data, false);
if (impl == default_data::class_id) {
if (data_ == nullptr
|| data_->implementation_id() != default_data::class_id)
data_ = make_counted<default_data>();
return data_->deserialize(source);
} else if (impl == uri_data::class_id) {
if (data_ == nullptr || data_->implementation_id() != uri_data::class_id)
data_ = make_counted<uri_data>();
return data_->deserialize(source);
}
return sec::unknown_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment