1 #include "PropertyRecord.h"
3 namespace Odb::Lib::FileModel::Design
6 std::unique_ptr<Odb::Lib::Protobuf::PropertyRecord>
7 PropertyRecord::to_protobuf()
const
9 std::unique_ptr<Odb::Lib::Protobuf::PropertyRecord> pPropertyRecordMessage(
new Odb::Lib::Protobuf::PropertyRecord);
10 pPropertyRecordMessage->set_name(name);
11 pPropertyRecordMessage->set_value(value);
12 for (
const auto& f : floatValues)
14 pPropertyRecordMessage->add_floatvalues(f);
16 return pPropertyRecordMessage;
19 void PropertyRecord::from_protobuf(
const Odb::Lib::Protobuf::PropertyRecord& message)
21 name = message.name();
22 value = message.value();
23 for (
int i = 0; i < message.floatvalues_size(); ++i)
25 floatValues.push_back(message.floatvalues(i));