KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiapi::common Namespace Reference

Functions

std::optional< KICAD_TTypeNameFromAny (const google::protobuf::Any &aMessage)
 
LIB_ID LibIdFromProto (const types::LibraryIdentifier &aId)
 
types::LibraryIdentifier LibIdToProto (const LIB_ID &aId)
 
void PackVector2 (types::Vector2 &aOutput, const VECTOR2I &aInput)
 
VECTOR2I UnpackVector2 (const types::Vector2 &aInput)
 
void PackBox2 (types::Box2 &aOutput, const BOX2I &aInput)
 
BOX2I UnpackBox2 (const types::Box2 &aInput)
 
void PackPolyLine (kiapi::common::types::PolyLine &aOutput, const SHAPE_LINE_CHAIN &aSlc)
 
SHAPE_LINE_CHAIN UnpackPolyLine (const kiapi::common::types::PolyLine &aInput)
 

Function Documentation

◆ LibIdFromProto()

LIB_ID kiapi::common::LibIdFromProto ( const types::LibraryIdentifier &  aId)

Definition at line 54 of file api_utils.cpp.

Referenced by FOOTPRINT::Deserialize().

◆ LibIdToProto()

types::LibraryIdentifier kiapi::common::LibIdToProto ( const LIB_ID aId)

Definition at line 60 of file api_utils.cpp.

References LIB_ID::GetLibItemName(), and LIB_ID::GetLibNickname().

Referenced by FOOTPRINT::Serialize().

◆ PackBox2()

void kiapi::common::PackBox2 ( types::Box2 &  aOutput,
const BOX2I aInput 
)

◆ PackPolyLine()

◆ PackVector2()

void kiapi::common::PackVector2 ( types::Vector2 &  aOutput,
const VECTOR2I aInput 
)

◆ TypeNameFromAny()

◆ UnpackBox2()

BOX2I kiapi::common::UnpackBox2 ( const types::Box2 &  aInput)

Definition at line 89 of file api_utils.cpp.

References UnpackVector2().

◆ UnpackPolyLine()

SHAPE_LINE_CHAIN kiapi::common::UnpackPolyLine ( const kiapi::common::types::PolyLine &  aInput)

Definition at line 125 of file api_utils.cpp.

References SHAPE_LINE_CHAIN::Append(), and SHAPE_LINE_CHAIN::SetClosed().

Referenced by PCB_SHAPE::Deserialize().

◆ UnpackVector2()