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 <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)
 

Function Documentation

◆ FromProtoEnum() [1/21]

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

Definition at line 690 of file api_pcb_enums.cpp.

References DIMMED, HIDDEN, and NORMAL.

◆ FromProtoEnum() [2/21]

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

Definition at line 723 of file api_pcb_enums.cpp.

References ALL, OFF, and RATSNEST.

◆ FromProtoEnum() [3/21]

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

Definition at line 755 of file api_pcb_enums.cpp.

References ALL, and VISIBLE.

◆ FromProtoEnum() [4/21]

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

Definition at line 543 of file api_pcb_enums.cpp.

References INWARD, and OUTWARD.

◆ FromProtoEnum() [5/21]

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

Definition at line 582 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() [6/21]

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

Definition at line 477 of file api_pcb_enums.cpp.

References CIRCLE, NONE, RECTANGLE, and ROUNDRECT.

◆ FromProtoEnum() [7/21]

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

Definition at line 622 of file api_pcb_enums.cpp.

References INLINE, MANUAL, and OUTSIDE.

◆ FromProtoEnum() [8/21]

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

Definition at line 656 of file api_pcb_enums.cpp.

References AUTOMATIC, INCHES, MILLIMETRES, and MILS.

◆ FromProtoEnum() [9/21]

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

Definition at line 511 of file api_pcb_enums.cpp.

References BARE_SUFFIX, NO_SUFFIX, and PAREN_SUFFIX.

◆ FromProtoEnum() [10/21]

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

Definition at line 87 of file api_pcb_enums.cpp.

References CIRCLE, OBLONG, and UNDEFINED.

◆ FromProtoEnum() [11/21]

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

Definition at line 305 of file api_pcb_enums.cpp.

References ALWAYS, AREA, and NEVER.

◆ FromProtoEnum() [12/21]

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

Definition at line 122 of file api_pcb_enums.cpp.

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

◆ FromProtoEnum() [13/21]

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

Definition at line 159 of file api_pcb_enums.cpp.

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

◆ FromProtoEnum() [14/21]

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

Definition at line 56 of file api_pcb_enums.cpp.

References CONN, NPTH, PTH, and SMD.

◆ FromProtoEnum() [15/21]

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

Definition at line 406 of file api_pcb_enums.cpp.

References COMPONENT_CLASS, and SHEETNAME.

◆ FromProtoEnum() [16/21]

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

Definition at line 442 of file api_pcb_enums.cpp.

References TD_NONE, TD_TRACKEND, TD_UNSPECIFIED, and TD_VIAPAD.

◆ FromProtoEnum() [17/21]

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

◆ FromProtoEnum() [18/21]

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

Definition at line 192 of file api_pcb_enums.cpp.

References BLIND_BURIED, MICROVIA, and THROUGH.

◆ FromProtoEnum() [19/21]

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

Definition at line 370 of file api_pcb_enums.cpp.

References DIAGONAL_EDGE, DIAGONAL_FULL, INVISIBLE_BORDER, and NO_HATCH.

◆ FromProtoEnum() [20/21]

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

Definition at line 227 of file api_pcb_enums.cpp.

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

◆ FromProtoEnum() [21/21]

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

Definition at line 337 of file api_pcb_enums.cpp.

References HATCH_PATTERN, and POLYGONS.

◆ ToProtoEnum() [1/21]

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

Definition at line 528 of file api_pcb_enums.cpp.

References INWARD, and OUTWARD.

◆ ToProtoEnum() [2/21]

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

Definition at line 559 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() [3/21]

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

Definition at line 460 of file api_pcb_enums.cpp.

References CIRCLE, NONE, RECTANGLE, and ROUNDRECT.

◆ ToProtoEnum() [4/21]

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

Definition at line 606 of file api_pcb_enums.cpp.

References INLINE, MANUAL, and OUTSIDE.

◆ ToProtoEnum() [5/21]

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

Definition at line 495 of file api_pcb_enums.cpp.

References BARE_SUFFIX, NO_SUFFIX, and PAREN_SUFFIX.

◆ ToProtoEnum() [6/21]

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

Definition at line 639 of file api_pcb_enums.cpp.

References AUTOMATIC, INCHES, MILLIMETRES, and MILS.

◆ ToProtoEnum() [7/21]

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

Definition at line 674 of file api_pcb_enums.cpp.

References DIMMED, HIDDEN, and NORMAL.

◆ ToProtoEnum() [8/21]

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

Definition at line 289 of file api_pcb_enums.cpp.

References ALWAYS, AREA, and NEVER.

◆ ToProtoEnum() [9/21]

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

Definition at line 707 of file api_pcb_enums.cpp.

References ALL, OFF, and RATSNEST.

◆ ToProtoEnum() [10/21]

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

Definition at line 39 of file api_pcb_enums.cpp.

References CONN, NPTH, PTH, and SMD.

◆ ToProtoEnum() [11/21]

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

Definition at line 73 of file api_pcb_enums.cpp.

References CIRCLE, OBLONG, and UNDEFINED.

◆ ToProtoEnum() [12/21]

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

Definition at line 102 of file api_pcb_enums.cpp.

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

◆ ToProtoEnum() [13/21]

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

Definition at line 143 of file api_pcb_enums.cpp.

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

◆ ToProtoEnum() [14/21]

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

◆ ToProtoEnum() [15/21]

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

Definition at line 740 of file api_pcb_enums.cpp.

References ALL, and VISIBLE.

◆ ToProtoEnum() [16/21]

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

Definition at line 388 of file api_pcb_enums.cpp.

References COMPONENT_CLASS, and SHEETNAME.

◆ ToProtoEnum() [17/21]

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

Definition at line 425 of file api_pcb_enums.cpp.

References TD_NONE, TD_TRACKEND, TD_UNSPECIFIED, and TD_VIAPAD.

◆ ToProtoEnum() [18/21]

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

Definition at line 176 of file api_pcb_enums.cpp.

References BLIND_BURIED, MICROVIA, and THROUGH.

◆ ToProtoEnum() [19/21]

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

Definition at line 353 of file api_pcb_enums.cpp.

References DIAGONAL_EDGE, DIAGONAL_FULL, INVISIBLE_BORDER, and NO_HATCH.

◆ ToProtoEnum() [20/21]

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

Definition at line 209 of file api_pcb_enums.cpp.

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

◆ ToProtoEnum() [21/21]

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

Definition at line 322 of file api_pcb_enums.cpp.

References HATCH_PATTERN, and POLYGONS.