KiCad PCB EDA Suite
Loading...
Searching...
No Matches
api_sch_utils.cpp File Reference
#include <algorithm>
#include <trace_helpers.h>
#include <sch_pin.h>
#include <lib_symbol.h>
#include <sch_symbol.h>
#include <sch_bitmap.h>
#include <sch_bus_entry.h>
#include <sch_field.h>
#include <sch_group.h>
#include <sch_junction.h>
#include <sch_label.h>
#include <sch_line.h>
#include <sch_no_connect.h>
#include <sch_shape.h>
#include <sch_sheet.h>
#include <sch_screen.h>
#include <sch_sheet_pin.h>
#include <sch_table.h>
#include <sch_tablecell.h>
#include <sch_text.h>
#include <sch_textbox.h>
#include "api_sch_utils.h"
#include <api/api_utils.h>
#include <api/api_enums.h>

Go to the source code of this file.

Functions

std::unique_ptr< EDA_ITEMCreateItemForType (KICAD_T aType, EDA_ITEM *aContainer)
 
void PackPinMapOverride (kiapi::schematic::types::PinMapInstanceOverride *aOutput, const PIN_MAP_INSTANCE_OVERRIDE &aOverride)
 Pack/unpack a pin-to-pad map instance override to/from its protobuf form (issue #2282).
 
PIN_MAP_INSTANCE_OVERRIDE UnpackPinMapOverride (const kiapi::schematic::types::PinMapInstanceOverride &aInput)
 
bool PackSymbol (kiapi::schematic::types::SchematicSymbolInstance *aOutput, const SCH_SYMBOL *aInput, const SCH_SHEET_PATH &aPath)
 
bool UnpackSymbol (SCH_SYMBOL *aOutput, const kiapi::schematic::types::SchematicSymbolInstance &aInput)
 
bool PackSheet (kiapi::schematic::types::SheetSymbol *aOutput, const SCH_SHEET *aInput, const SCH_SHEET_PATH &aPath)
 
tl::expected< bool, ApiResponseStatus > UnpackSheet (SCH_SHEET *aOutput, const kiapi::schematic::types::SheetSymbol &aInput)
 

Function Documentation

◆ CreateItemForType()

◆ PackPinMapOverride()

void PackPinMapOverride ( kiapi::schematic::types::PinMapInstanceOverride * aOutput,
const PIN_MAP_INSTANCE_OVERRIDE & aOverride )

Pack/unpack a pin-to-pad map instance override to/from its protobuf form (issue #2282).

Definition at line 105 of file api_sch_utils.cpp.

References edit, PIN_MAP_INSTANCE_OVERRIDE::m_ActiveMapName, PIN_MAP_INSTANCE_OVERRIDE::m_Edits, PIN_MAP_INSTANCE_OVERRIDE::m_Mode, and ToProtoEnum().

Referenced by BOOST_AUTO_TEST_CASE(), and PackSymbol().

◆ PackSheet()

◆ PackSymbol()

◆ UnpackPinMapOverride()

PIN_MAP_INSTANCE_OVERRIDE UnpackPinMapOverride ( const kiapi::schematic::types::PinMapInstanceOverride & aInput)

Definition at line 122 of file api_sch_utils.cpp.

References FromProtoEnum(), and PIN_MAP_INSTANCE_OVERRIDE::m_Mode.

Referenced by BOOST_AUTO_TEST_CASE(), and UnpackSymbol().

◆ UnpackSheet()

tl::expected< bool, ApiResponseStatus > UnpackSheet ( SCH_SHEET * aOutput,
const kiapi::schematic::types::SheetSymbol & aInput )

◆ UnpackSymbol()