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

Implement deserialization of URI node IDs

parent 68641365
...@@ -133,6 +133,8 @@ public: ...@@ -133,6 +133,8 @@ public:
// -- constructors, destructors, and assignment operators ------------------ // -- constructors, destructors, and assignment operators ------------------
uri_data() = default;
explicit uri_data(uri value); explicit uri_data(uri value);
// -- properties ----------------------------------------------------------- // -- properties -----------------------------------------------------------
......
...@@ -211,9 +211,14 @@ error node_id::deserialize(deserializer& source) { ...@@ -211,9 +211,14 @@ error node_id::deserialize(deserializer& source) {
data_.reset(); data_.reset();
return none; return none;
} }
if (impl == atom("default")) { if (impl == default_data::class_id) {
if (data_ == nullptr || data_->implementation_id() != atom("default")) if (data_ == nullptr
data_.reset(new default_data, false); || 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 data_->deserialize(source);
} }
return sec::unknown_type; 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