data::GroupAndNetworkValues: add serializer support
This commit is contained in:
parent
231b71a29c
commit
bc6d5e38ce
@ -257,6 +257,21 @@ namespace Opm { namespace data {
|
|||||||
return json_data;
|
return json_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Serializer>
|
||||||
|
void serializeOp(Serializer& serializer)
|
||||||
|
{
|
||||||
|
serializer.map(groupData);
|
||||||
|
serializer.map(nodeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
static GroupAndNetworkValues serializeObject()
|
||||||
|
{
|
||||||
|
return GroupAndNetworkValues{
|
||||||
|
{{"test_data", GroupData::serializeObject()}},
|
||||||
|
{{"test_node", NodeData::serializeObject()}}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <class MessageBufferType, class ValueType>
|
template <class MessageBufferType, class ValueType>
|
||||||
void writeMap(const std::map<std::string, ValueType>& map,
|
void writeMap(const std::map<std::string, ValueType>& map,
|
||||||
|
Loading…
Reference in New Issue
Block a user