LCOV - code coverage report
Current view: top level - OdbDesignLib/ProductModel - Part.cpp (source / functions) Coverage Total Hit
Test: OdbDesign Test Coverage Lines: 92.3 % 13 12
Test Date: 2026-11-21 03:51:50 Functions: 100.0 % 4 4
Legend: Lines: hit not hit

            Line data    Source code
       1              : #include "Part.h"
       2              : #include <string>
       3              : #include "part.pb.h"
       4              : #include <memory>
       5              : #include "../Text/Utf8Sanitizer.h"
       6              : 
       7              : namespace Odb::Lib::ProductModel
       8              : {
       9        30270 :         Part::Part(const std::string& name)
      10        30270 :                 : m_name(name)
      11              :         {
      12        30270 :         }
      13              : 
      14            4 :         std::string Part::GetName() const
      15              :         {
      16            4 :                 return m_name;
      17              :         }
      18              : 
      19        81012 :         std::unique_ptr<Odb::Lib::Protobuf::ProductModel::Part> Odb::Lib::ProductModel::Part::to_protobuf() const
      20              :         {
      21        81012 :                 auto pPartMsg = std::make_unique<Odb::Lib::Protobuf::ProductModel::Part>();
      22       162024 :                 pPartMsg->set_name(Odb::Lib::Text::ToUtf8(m_name));
      23        81012 :                 return pPartMsg;
      24            0 :         }
      25              : 
      26        21672 :         void Odb::Lib::ProductModel::Part::from_protobuf(const Odb::Lib::Protobuf::ProductModel::Part& message)
      27              :         {
      28        21672 :                 m_name = message.name();
      29        21672 :         }
      30              : }
        

Generated by: LCOV version 2.0-1