LCOV - code coverage report
Current view: top level - OdbDesignLib/FileModel/Design - PropertyRecord.cpp (source / functions) Coverage Total Hit
Test: OdbDesign Test Coverage Lines: 92.9 % 14 13
Test Date: 2026-11-21 03:51:50 Functions: 100.0 % 2 2
Legend: Lines: hit not hit

            Line data    Source code
       1              : #include "PropertyRecord.h"
       2              : #include "../../Text/Utf8Sanitizer.h"
       3              : 
       4              : namespace Odb::Lib::FileModel::Design
       5              : {
       6              :     // Inherited via IProtoBuffable
       7              :     std::unique_ptr<Odb::Lib::Protobuf::PropertyRecord>
       8      2078717 :     PropertyRecord::to_protobuf() const
       9              :     {
      10      2078717 :         std::unique_ptr<Odb::Lib::Protobuf::PropertyRecord> pPropertyRecordMessage(new Odb::Lib::Protobuf::PropertyRecord);
      11      4157434 :         pPropertyRecordMessage->set_name(Odb::Lib::Text::ToUtf8(name));
      12      4157434 :         pPropertyRecordMessage->set_value(Odb::Lib::Text::ToUtf8(value));
      13      2099938 :         for (const auto& f : floatValues)
      14              :         {
      15        21221 :             pPropertyRecordMessage->add_floatvalues(f);
      16              :         }
      17      2078717 :         return pPropertyRecordMessage;
      18            0 :     }
      19              : 
      20       102218 :     void PropertyRecord::from_protobuf(const Odb::Lib::Protobuf::PropertyRecord& message)
      21              :     {
      22       102218 :         name = message.name();
      23       102218 :                 value = message.value();
      24       103683 :         for (int i = 0; i < message.floatvalues_size(); ++i)
      25              :         {
      26         1465 :                         floatValues.push_back(message.floatvalues(i));
      27              :                 }
      28       102218 :     }
      29              : }
        

Generated by: LCOV version 2.0-1