OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
Odb::Lib::ProductModel::Component Class Reference

#include <Component.h>

Inheritance diagram for Odb::Lib::ProductModel::Component:
[legend]
Collaboration diagram for Odb::Lib::ProductModel::Component:
[legend]

Public Types

typedef std::vector< std::shared_ptr< Component > > Vector
 
typedef std::map< std::string, std::shared_ptr< Component > > StringMap
 

Public Member Functions

 Component ()
 
 Component (const std::string &refDes, const std::string &partName, std::shared_ptr< Package > pPackage, unsigned int index, BoardSide side, std::shared_ptr< Part > pPart, std::optional< unsigned int > id=std::nullopt)
 
 ~Component ()
 
std::string GetRefDes () const
 
std::string GetPartName () const
 
std::shared_ptr< Package > GetPackage () const
 
unsigned int GetIndex () const
 
BoardSide GetSide () const
 
std::shared_ptr< Part > GetPart () const
 
std::optional< unsigned int > GetId () const
 
std::unique_ptr< Odb::Lib::Protobuf::ProductModel::Component > to_protobuf () const override
 
void from_protobuf (const Odb::Lib::Protobuf::ProductModel::Component &message) override
 
- Public Member Functions inherited from Odb::Lib::IProtoBuffable< Odb::Lib::Protobuf::ProductModel::Component >
bool to_pbstring (std::string &pb_string) const
 
bool from_pbstring (const std::string &pb_string)
 
bool to_stream (std::ostream &outputStream) const
 
bool from_stream (std::istream &inputStream)
 
std::string to_json () const override
 
void from_json (const std::string &json) override
 
- Public Member Functions inherited from Utils::IJsonable
virtual ~IJsonable ()
 

Additional Inherited Members

- Protected Member Functions inherited from Odb::Lib::IProtoBuffable< Odb::Lib::Protobuf::ProductModel::Component >
 IProtoBuffable ()=default
 
- Protected Member Functions inherited from Utils::IJsonable
 IJsonable ()=default
 

Detailed Description

Definition at line 18 of file Component.h.

Member Typedef Documentation

◆ StringMap

typedef std::map<std::string, std::shared_ptr<Component> > Odb::Lib::ProductModel::Component::StringMap

Definition at line 43 of file Component.h.

◆ Vector

typedef std::vector<std::shared_ptr<Component> > Odb::Lib::ProductModel::Component::Vector

Definition at line 42 of file Component.h.

Constructor & Destructor Documentation

◆ Component() [1/2]

Odb::Lib::ProductModel::Component::Component ( )

Definition at line 14 of file Component.cpp.

◆ Component() [2/2]

Odb::Lib::ProductModel::Component::Component ( const std::string &  refDes,
const std::string &  partName,
std::shared_ptr< Package >  pPackage,
unsigned int  index,
BoardSide  side,
std::shared_ptr< Part >  pPart,
std::optional< unsigned int >  id = std::nullopt 
)

Definition at line 24 of file Component.cpp.

◆ ~Component()

Odb::Lib::ProductModel::Component::~Component ( )

Definition at line 35 of file Component.cpp.

Member Function Documentation

◆ from_protobuf()

void Odb::Lib::ProductModel::Component::from_protobuf ( const Odb::Lib::Protobuf::ProductModel::Component &  message)
overridevirtual

◆ GetId()

std::optional< unsigned int > Odb::Lib::ProductModel::Component::GetId ( ) const

Definition at line 69 of file Component.cpp.

◆ GetIndex()

unsigned int Odb::Lib::ProductModel::Component::GetIndex ( ) const

Definition at line 54 of file Component.cpp.

◆ GetPackage()

std::shared_ptr< Package > Odb::Lib::ProductModel::Component::GetPackage ( ) const

Definition at line 49 of file Component.cpp.

◆ GetPart()

std::shared_ptr< Part > Odb::Lib::ProductModel::Component::GetPart ( ) const

Definition at line 64 of file Component.cpp.

◆ GetPartName()

std::string Odb::Lib::ProductModel::Component::GetPartName ( ) const

Definition at line 44 of file Component.cpp.

◆ GetRefDes()

std::string Odb::Lib::ProductModel::Component::GetRefDes ( ) const

Definition at line 39 of file Component.cpp.

Here is the caller graph for this function:

◆ GetSide()

BoardSide Odb::Lib::ProductModel::Component::GetSide ( ) const

Definition at line 59 of file Component.cpp.

◆ to_protobuf()

std::unique_ptr< Odb::Lib::Protobuf::ProductModel::Component > Odb::Lib::ProductModel::Component::to_protobuf ( ) const
overridevirtual

Implements Odb::Lib::IProtoBuffable< Odb::Lib::Protobuf::ProductModel::Component >.

Definition at line 74 of file Component.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: