LCOV - code coverage report
Current view: top level - OdbDesignLib/ProductModel - Pin.cpp (source / functions) Coverage Total Hit
Test: OdbDesign Test Coverage Lines: 94.4 % 18 17
Test Date: 2026-11-19 04:56:22 Functions: 100.0 % 5 5
Legend: Lines: hit not hit

            Line data    Source code
       1              : #include "Pin.h"
       2              : #include <string>
       3              : #include <memory>
       4              : #include "pin.pb.h"
       5              : #include "../Text/Utf8Sanitizer.h"
       6              : 
       7              : namespace Odb::Lib::ProductModel
       8              : {       
       9      1895500 :         Pin::Pin(const std::string& name, unsigned int index)
      10      1895500 :                 : m_name(name)
      11      1895500 :                 , m_index(index)
      12              :         {
      13      1895500 :         }
      14              : 
      15       558890 :         std::string Pin::GetName() const
      16              :         {
      17       558890 :                 return m_name;
      18              :         }
      19              : 
      20       805044 :         unsigned int Pin::GetIndex() const
      21              :         {
      22       805044 :                 return m_index;
      23              :         }
      24              : 
      25      5582214 :         std::unique_ptr<Odb::Lib::Protobuf::ProductModel::Pin> Odb::Lib::ProductModel::Pin::to_protobuf() const
      26              :         {
      27      5582214 :                 auto pPinMessage =  std::make_unique<Odb::Lib::Protobuf::ProductModel::Pin>();
      28     11164428 :                 pPinMessage->set_name(Odb::Lib::Text::ToUtf8(m_name));
      29      5582214 :                 pPinMessage->set_index(m_index);
      30      5582214 :                 return pPinMessage;
      31            0 :         }
      32              : 
      33      1828710 :         void Pin::from_protobuf(const Odb::Lib::Protobuf::ProductModel::Pin& message)
      34              :         {
      35      1828710 :                 m_name = message.name();
      36      1828710 :                 m_index = message.index();
      37      1828710 :         }       
      38              : }
        

Generated by: LCOV version 2.0-1