data::GroupAndNetworkValues: add serializer support

This commit is contained in:
Arne Morten Kvarving 2022-09-02 18:12:09 +02:00
parent 231b71a29c
commit bc6d5e38ce

View File

@ -257,6 +257,21 @@ namespace Opm { namespace 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:
template <class MessageBufferType, class ValueType>
void writeMap(const std::map<std::string, ValueType>& map,