KiCad PCB EDA Suite
Loading...
Searching...
No Matches
api_pcb_enums.cpp File Reference
#include <import_export.h>
#include <api/api_enums.h>
#include <api/board/board_types.pb.h>
#include <api/board/board_commands.pb.h>
#include <wx/wx.h>
#include <board_stackup_manager/board_stackup.h>
#include <padstack.h>
#include <pcb_dimension.h>
#include <pcb_track.h>
#include <zones.h>
#include <zone_settings.h>
#include <project/board_project_settings.h>

Go to the source code of this file.

Functions

template<>
types::PadType ToProtoEnum (PAD_ATTRIB aValue)
 
template<>
PAD_ATTRIB FromProtoEnum (types::PadType aValue)
 
template<>
types::DrillShape ToProtoEnum (PAD_DRILL_SHAPE aValue)
 
template<>
PAD_DRILL_SHAPE FromProtoEnum (types::DrillShape aValue)
 
template<>
types::PadStackShape ToProtoEnum (PAD_SHAPE aValue)
 
template<>
PAD_SHAPE FromProtoEnum (types::PadStackShape aValue)
 
template<>
types::PadStackType ToProtoEnum (PADSTACK::MODE aValue)
 
template<>
PADSTACK::MODE FromProtoEnum (types::PadStackType aValue)
 
template<>
types::ViaType ToProtoEnum (VIATYPE aValue)
 
template<>
VIATYPE FromProtoEnum (types::ViaType aValue)
 
template<>
types::ZoneConnectionStyle ToProtoEnum (ZONE_CONNECTION aValue)
 
template<>
ZONE_CONNECTION FromProtoEnum (types::ZoneConnectionStyle aValue)
 
template<>
types::UnconnectedLayerRemoval ToProtoEnum (PADSTACK::UNCONNECTED_LAYER_MODE aValue)
 
template<>
PADSTACK::UNCONNECTED_LAYER_MODE FromProtoEnum (types::UnconnectedLayerRemoval aValue)
 
template<>
types::IslandRemovalMode ToProtoEnum (ISLAND_REMOVAL_MODE aValue)
 
template<>
ISLAND_REMOVAL_MODE FromProtoEnum (types::IslandRemovalMode aValue)
 
template<>
types::ZoneFillMode ToProtoEnum (ZONE_FILL_MODE aValue)
 
template<>
ZONE_FILL_MODE FromProtoEnum (types::ZoneFillMode aValue)
 
template<>
types::ZoneBorderStyle ToProtoEnum (ZONE_BORDER_DISPLAY_STYLE aValue)
 
template<>
ZONE_BORDER_DISPLAY_STYLE FromProtoEnum (types::ZoneBorderStyle aValue)
 
template<>
types::PlacementRuleSourceType ToProtoEnum (RULE_AREA_PLACEMENT_SOURCE_TYPE aValue)
 
template<>
RULE_AREA_PLACEMENT_SOURCE_TYPE FromProtoEnum (types::PlacementRuleSourceType aValue)
 
template<>
types::TeardropType ToProtoEnum (TEARDROP_TYPE aValue)
 
template<>
TEARDROP_TYPE FromProtoEnum (types::TeardropType aValue)
 
template<>
types::DimensionTextBorderStyle ToProtoEnum (DIM_TEXT_BORDER aValue)
 
template<>
DIM_TEXT_BORDER FromProtoEnum (types::DimensionTextBorderStyle aValue)
 
template<>
types::DimensionUnitFormat ToProtoEnum (DIM_UNITS_FORMAT aValue)
 
template<>
DIM_UNITS_FORMAT FromProtoEnum (types::DimensionUnitFormat aValue)
 
template<>
types::DimensionArrowDirection ToProtoEnum (DIM_ARROW_DIRECTION aValue)
 
template<>
DIM_ARROW_DIRECTION FromProtoEnum (types::DimensionArrowDirection aValue)
 
template<>
types::DimensionPrecision ToProtoEnum (DIM_PRECISION aValue)
 
template<>
DIM_PRECISION FromProtoEnum (types::DimensionPrecision aValue)
 
template<>
types::DimensionTextPosition ToProtoEnum (DIM_TEXT_POSITION aValue)
 
template<>
DIM_TEXT_POSITION FromProtoEnum (types::DimensionTextPosition aValue)
 
template<>
types::DimensionUnit ToProtoEnum (DIM_UNITS_MODE aValue)
 
template<>
DIM_UNITS_MODE FromProtoEnum (types::DimensionUnit aValue)
 
template<>
commands::InactiveLayerDisplayMode ToProtoEnum (HIGH_CONTRAST_MODE aValue)
 
template<>
HIGH_CONTRAST_MODE FromProtoEnum (commands::InactiveLayerDisplayMode aValue)
 
template<>
commands::NetColorDisplayMode ToProtoEnum (NET_COLOR_MODE aValue)
 
template<>
NET_COLOR_MODE FromProtoEnum (commands::NetColorDisplayMode aValue)
 
template<>
commands::RatsnestDisplayMode ToProtoEnum (RATSNEST_MODE aValue)
 
template<>
RATSNEST_MODE FromProtoEnum (commands::RatsnestDisplayMode aValue)
 
template<>
BoardStackupLayerType ToProtoEnum (BOARD_STACKUP_ITEM_TYPE aValue)
 
template<>
BOARD_STACKUP_ITEM_TYPE FromProtoEnum (BoardStackupLayerType aValue)
 

Function Documentation

◆ FromProtoEnum() [1/22]

template<>
BOARD_STACKUP_ITEM_TYPE FromProtoEnum ( BoardStackupLayerType  aValue)

◆ FromProtoEnum() [2/22]

template<>
HIGH_CONTRAST_MODE FromProtoEnum ( commands::InactiveLayerDisplayMode  aValue)

Definition at line 691 of file api_pcb_enums.cpp.

References DIMMED, HIDDEN, and NORMAL.

◆ FromProtoEnum() [3/22]

template<>
NET_COLOR_MODE FromProtoEnum ( commands::NetColorDisplayMode  aValue)

Definition at line 724 of file api_pcb_enums.cpp.

References ALL, OFF, and RATSNEST.

◆ FromProtoEnum() [4/22]

template<>
RATSNEST_MODE FromProtoEnum ( commands::RatsnestDisplayMode  aValue)

Definition at line 756 of file api_pcb_enums.cpp.

References ALL, and VISIBLE.

◆ FromProtoEnum() [5/22]

template<>
DIM_ARROW_DIRECTION FromProtoEnum ( types::DimensionArrowDirection  aValue)

Definition at line 544 of file api_pcb_enums.cpp.

References INWARD, and OUTWARD.

◆ FromProtoEnum() [6/22]

template<>
DIM_PRECISION FromProtoEnum ( types::DimensionPrecision  aValue)

Definition at line 583 of file api_pcb_enums.cpp.

References V_VV, V_VVV, V_VVVV, V_VVVVV, X, X_X, X_XX, X_XXX, X_XXXX, and X_XXXXX.

◆ FromProtoEnum() [7/22]

template<>
DIM_TEXT_BORDER FromProtoEnum ( types::DimensionTextBorderStyle  aValue)

Definition at line 478 of file api_pcb_enums.cpp.

References CIRCLE, NONE, RECTANGLE, and ROUNDRECT.

◆ FromProtoEnum() [8/22]

template<>
DIM_TEXT_POSITION FromProtoEnum ( types::DimensionTextPosition  aValue)

Definition at line 623 of file api_pcb_enums.cpp.

References INLINE, MANUAL, and OUTSIDE.

◆ FromProtoEnum() [9/22]

template<>
DIM_UNITS_MODE FromProtoEnum ( types::DimensionUnit  aValue)

Definition at line 657 of file api_pcb_enums.cpp.

References AUTOMATIC, INCHES, MILLIMETRES, and MILS.

◆ FromProtoEnum() [10/22]

template<>
DIM_UNITS_FORMAT FromProtoEnum ( types::DimensionUnitFormat  aValue)

Definition at line 512 of file api_pcb_enums.cpp.

References BARE_SUFFIX, NO_SUFFIX, and PAREN_SUFFIX.

◆ FromProtoEnum() [11/22]

template<>
PAD_DRILL_SHAPE FromProtoEnum ( types::DrillShape  aValue)

Definition at line 88 of file api_pcb_enums.cpp.

References CIRCLE, OBLONG, and UNDEFINED.

◆ FromProtoEnum() [12/22]

template<>
ISLAND_REMOVAL_MODE FromProtoEnum ( types::IslandRemovalMode  aValue)

Definition at line 306 of file api_pcb_enums.cpp.

References ALWAYS, AREA, and NEVER.

◆ FromProtoEnum() [13/22]

template<>
PAD_SHAPE FromProtoEnum ( types::PadStackShape  aValue)

Definition at line 123 of file api_pcb_enums.cpp.

References CHAMFERED_RECT, CIRCLE, CUSTOM, OVAL, RECTANGLE, ROUNDRECT, and TRAPEZOID.

◆ FromProtoEnum() [14/22]

template<>
PADSTACK::MODE FromProtoEnum ( types::PadStackType  aValue)

Definition at line 160 of file api_pcb_enums.cpp.

References PADSTACK::CUSTOM, PADSTACK::FRONT_INNER_BACK, and PADSTACK::NORMAL.

◆ FromProtoEnum() [15/22]

template<>
PAD_ATTRIB FromProtoEnum ( types::PadType  aValue)

Definition at line 57 of file api_pcb_enums.cpp.

References CONN, NPTH, PTH, and SMD.

◆ FromProtoEnum() [16/22]

template<>
RULE_AREA_PLACEMENT_SOURCE_TYPE FromProtoEnum ( types::PlacementRuleSourceType  aValue)

Definition at line 407 of file api_pcb_enums.cpp.

References COMPONENT_CLASS, and SHEETNAME.

◆ FromProtoEnum() [17/22]

template<>
TEARDROP_TYPE FromProtoEnum ( types::TeardropType  aValue)

Definition at line 443 of file api_pcb_enums.cpp.

References TD_NONE, TD_TRACKEND, TD_UNSPECIFIED, and TD_VIAPAD.

◆ FromProtoEnum() [18/22]

template<>
PADSTACK::UNCONNECTED_LAYER_MODE FromProtoEnum ( types::UnconnectedLayerRemoval  aValue)

◆ FromProtoEnum() [19/22]

template<>
VIATYPE FromProtoEnum ( types::ViaType  aValue)

Definition at line 193 of file api_pcb_enums.cpp.

References BLIND_BURIED, MICROVIA, and THROUGH.

◆ FromProtoEnum() [20/22]

template<>
ZONE_BORDER_DISPLAY_STYLE FromProtoEnum ( types::ZoneBorderStyle  aValue)

Definition at line 371 of file api_pcb_enums.cpp.

References DIAGONAL_EDGE, DIAGONAL_FULL, INVISIBLE_BORDER, and NO_HATCH.

◆ FromProtoEnum() [21/22]

template<>
ZONE_CONNECTION FromProtoEnum ( types::ZoneConnectionStyle  aValue)

Definition at line 228 of file api_pcb_enums.cpp.

References FULL, INHERITED, NONE, THERMAL, and THT_THERMAL.

◆ FromProtoEnum() [22/22]

template<>
ZONE_FILL_MODE FromProtoEnum ( types::ZoneFillMode  aValue)

Definition at line 338 of file api_pcb_enums.cpp.

References HATCH_PATTERN, and POLYGONS.

◆ ToProtoEnum() [1/22]

◆ ToProtoEnum() [2/22]

template<>
types::DimensionArrowDirection ToProtoEnum ( DIM_ARROW_DIRECTION  aValue)

Definition at line 529 of file api_pcb_enums.cpp.

References INWARD, and OUTWARD.

◆ ToProtoEnum() [3/22]

template<>
types::DimensionPrecision ToProtoEnum ( DIM_PRECISION  aValue)

Definition at line 560 of file api_pcb_enums.cpp.

References V_VV, V_VVV, V_VVVV, V_VVVVV, X, X_X, X_XX, X_XXX, X_XXXX, and X_XXXXX.

◆ ToProtoEnum() [4/22]

template<>
types::DimensionTextBorderStyle ToProtoEnum ( DIM_TEXT_BORDER  aValue)

Definition at line 461 of file api_pcb_enums.cpp.

References CIRCLE, NONE, RECTANGLE, and ROUNDRECT.

◆ ToProtoEnum() [5/22]

template<>
types::DimensionTextPosition ToProtoEnum ( DIM_TEXT_POSITION  aValue)

Definition at line 607 of file api_pcb_enums.cpp.

References INLINE, MANUAL, and OUTSIDE.

◆ ToProtoEnum() [6/22]

template<>
types::DimensionUnitFormat ToProtoEnum ( DIM_UNITS_FORMAT  aValue)

Definition at line 496 of file api_pcb_enums.cpp.

References BARE_SUFFIX, NO_SUFFIX, and PAREN_SUFFIX.

◆ ToProtoEnum() [7/22]

template<>
types::DimensionUnit ToProtoEnum ( DIM_UNITS_MODE  aValue)

Definition at line 640 of file api_pcb_enums.cpp.

References AUTOMATIC, INCHES, MILLIMETRES, and MILS.

◆ ToProtoEnum() [8/22]

template<>
commands::InactiveLayerDisplayMode ToProtoEnum ( HIGH_CONTRAST_MODE  aValue)

Definition at line 675 of file api_pcb_enums.cpp.

References DIMMED, HIDDEN, and NORMAL.

◆ ToProtoEnum() [9/22]

template<>
types::IslandRemovalMode ToProtoEnum ( ISLAND_REMOVAL_MODE  aValue)

Definition at line 290 of file api_pcb_enums.cpp.

References ALWAYS, AREA, and NEVER.

◆ ToProtoEnum() [10/22]

template<>
commands::NetColorDisplayMode ToProtoEnum ( NET_COLOR_MODE  aValue)

Definition at line 708 of file api_pcb_enums.cpp.

References ALL, OFF, and RATSNEST.

◆ ToProtoEnum() [11/22]

template<>
types::PadType ToProtoEnum ( PAD_ATTRIB  aValue)

Definition at line 40 of file api_pcb_enums.cpp.

References CONN, NPTH, PTH, and SMD.

◆ ToProtoEnum() [12/22]

template<>
types::DrillShape ToProtoEnum ( PAD_DRILL_SHAPE  aValue)

Definition at line 74 of file api_pcb_enums.cpp.

References CIRCLE, OBLONG, and UNDEFINED.

◆ ToProtoEnum() [13/22]

template<>
types::PadStackShape ToProtoEnum ( PAD_SHAPE  aValue)

Definition at line 103 of file api_pcb_enums.cpp.

References CHAMFERED_RECT, CIRCLE, CUSTOM, OVAL, RECTANGLE, ROUNDRECT, and TRAPEZOID.

◆ ToProtoEnum() [14/22]

template<>
types::PadStackType ToProtoEnum ( PADSTACK::MODE  aValue)

Definition at line 144 of file api_pcb_enums.cpp.

References PADSTACK::CUSTOM, PADSTACK::FRONT_INNER_BACK, and PADSTACK::NORMAL.

◆ ToProtoEnum() [15/22]

template<>
types::UnconnectedLayerRemoval ToProtoEnum ( PADSTACK::UNCONNECTED_LAYER_MODE  aValue)

◆ ToProtoEnum() [16/22]

template<>
commands::RatsnestDisplayMode ToProtoEnum ( RATSNEST_MODE  aValue)

Definition at line 741 of file api_pcb_enums.cpp.

References ALL, and VISIBLE.

◆ ToProtoEnum() [17/22]

template<>
types::PlacementRuleSourceType ToProtoEnum ( RULE_AREA_PLACEMENT_SOURCE_TYPE  aValue)

Definition at line 389 of file api_pcb_enums.cpp.

References COMPONENT_CLASS, and SHEETNAME.

◆ ToProtoEnum() [18/22]

template<>
types::TeardropType ToProtoEnum ( TEARDROP_TYPE  aValue)

Definition at line 426 of file api_pcb_enums.cpp.

References TD_NONE, TD_TRACKEND, TD_UNSPECIFIED, and TD_VIAPAD.

◆ ToProtoEnum() [19/22]

template<>
types::ViaType ToProtoEnum ( VIATYPE  aValue)

Definition at line 177 of file api_pcb_enums.cpp.

References BLIND_BURIED, MICROVIA, and THROUGH.

◆ ToProtoEnum() [20/22]

template<>
types::ZoneBorderStyle ToProtoEnum ( ZONE_BORDER_DISPLAY_STYLE  aValue)

Definition at line 354 of file api_pcb_enums.cpp.

References DIAGONAL_EDGE, DIAGONAL_FULL, INVISIBLE_BORDER, and NO_HATCH.

◆ ToProtoEnum() [21/22]

template<>
types::ZoneConnectionStyle ToProtoEnum ( ZONE_CONNECTION  aValue)

Definition at line 210 of file api_pcb_enums.cpp.

References FULL, INHERITED, NONE, THERMAL, and THT_THERMAL.

◆ ToProtoEnum() [22/22]

template<>
types::ZoneFillMode ToProtoEnum ( ZONE_FILL_MODE  aValue)

Definition at line 323 of file api_pcb_enums.cpp.

References HATCH_PATTERN, and POLYGONS.