KiCad PCB EDA Suite
|
#include <type_traits>
Go to the source code of this file.
Functions | |
template<class T , class I > | |
bool | IsA (const I *aObject) |
Check if the type of aObject is T. | |
template<class T , class I > | |
bool | IsA (const I &aObject) |
template<class Casted , class From > | |
Casted | dyn_cast (From aObject) |
A lightweight dynamic downcast. | |
constexpr KICAD_T | BaseType (const KICAD_T aType) |
Return the underlying type of the given type. | |
constexpr bool | IsNullType (const KICAD_T aType) |
constexpr bool | IsInstantiableType (const KICAD_T aType) |
constexpr bool | IsEeschemaType (const KICAD_T aType) |
constexpr bool | IsPcbnewType (const KICAD_T aType) |
constexpr bool | IsGerbviewType (const KICAD_T aType) |
constexpr bool | IsPageLayoutEditorType (const KICAD_T aType) |
constexpr bool | IsMiscType (const KICAD_T aType) |
constexpr bool | IsTypeCorrect (KICAD_T aType) |
enum KICAD_T |
The set of class identification values stored in EDA_ITEM::m_structType.
Enumerator | |
---|---|
NOT_USED | the 3d code uses this value |
TYPE_NOT_INIT | |
PCB_T | |
SCREEN_T | not really an item, used to identify a screen |
PCB_FOOTPRINT_T | class FOOTPRINT, a footprint |
PCB_PAD_T | class PAD, a pad in a footprint |
PCB_SHAPE_T | class PCB_SHAPE, a segment not on copper layers |
PCB_REFERENCE_IMAGE_T | class PCB_REFERENCE_IMAGE, bitmap on a layer |
PCB_FIELD_T | class PCB_FIELD, text associated with a footprint property |
PCB_GENERATOR_T | class PCB_GENERATOR, generator on a layer |
PCB_TEXT_T | class PCB_TEXT, text on a layer |
PCB_TEXTBOX_T | class PCB_TEXTBOX, wrapped text on a layer |
PCB_TABLE_T | class PCB_TABLE, table of PCB_TABLECELLs |
PCB_TABLECELL_T | class PCB_TABLECELL, PCB_TEXTBOX for use in tables |
PCB_TRACE_T | class PCB_TRACK, a track segment (segment on a copper layer) |
PCB_VIA_T | class PCB_VIA, a via (like a track segment on a copper layer) |
PCB_ARC_T | class PCB_ARC, an arc track segment on a copper layer |
PCB_MARKER_T | class PCB_MARKER, a marker used to show something |
PCB_DIMENSION_T | class PCB_DIMENSION_BASE: abstract dimension meta-type |
PCB_DIM_ALIGNED_T | class PCB_DIM_ALIGNED, a linear dimension (graphic item) |
PCB_DIM_LEADER_T | class PCB_DIM_LEADER, a leader dimension (graphic item) |
PCB_DIM_CENTER_T | class PCB_DIM_CENTER, a center point marking (graphic item) |
PCB_DIM_RADIAL_T | class PCB_DIM_RADIAL, a radius or diameter dimension |
PCB_DIM_ORTHOGONAL_T | class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y |
PCB_TARGET_T | class PCB_TARGET, a target (graphic item) |
PCB_ZONE_T | class ZONE, a copper pour area |
PCB_ITEM_LIST_T | class BOARD_ITEM_LIST, a list of board items |
PCB_NETINFO_T | class NETINFO_ITEM, a description of a net |
PCB_GROUP_T | class PCB_GROUP, a set of BOARD_ITEMs |
PCB_FIELD_LOCATE_REFERENCE_T | |
PCB_FIELD_LOCATE_VALUE_T | |
PCB_FIELD_LOCATE_FOOTPRINT_T | |
PCB_FIELD_LOCATE_DATASHEET_T | |
PCB_LOCATE_STDVIA_T | |
PCB_LOCATE_UVIA_T | |
PCB_LOCATE_BBVIA_T | |
PCB_LOCATE_TEXT_T | |
PCB_LOCATE_HOLE_T | |
PCB_LOCATE_PTH_T | |
PCB_LOCATE_NPTH_T | |
PCB_LOCATE_BOARD_EDGE_T | |
PCB_SHAPE_LOCATE_SEGMENT_T | |
PCB_SHAPE_LOCATE_RECT_T | |
PCB_SHAPE_LOCATE_CIRCLE_T | |
PCB_SHAPE_LOCATE_ARC_T | |
PCB_SHAPE_LOCATE_POLY_T | |
PCB_SHAPE_LOCATE_BEZIER_T | |
LIB_SYMBOL_T | |
SCH_SHAPE_T | |
SCH_FIELD_T | |
SCH_TEXT_T | |
SCH_TEXTBOX_T | |
SCH_PIN_T | |
SCH_MARKER_T | |
SCH_JUNCTION_T | |
SCH_NO_CONNECT_T | |
SCH_BUS_WIRE_ENTRY_T | |
SCH_BUS_BUS_ENTRY_T | |
SCH_LINE_T | |
SCH_BITMAP_T | |
SCH_TABLE_T | |
SCH_TABLECELL_T | |
SCH_LABEL_T | |
SCH_GLOBAL_LABEL_T | |
SCH_HIER_LABEL_T | |
SCH_RULE_AREA_T | |
SCH_DIRECTIVE_LABEL_T | |
SCH_SYMBOL_T | |
SCH_SHEET_PIN_T | |
SCH_SHEET_T | |
SCH_FIELD_LOCATE_REFERENCE_T | |
SCH_FIELD_LOCATE_VALUE_T | |
SCH_FIELD_LOCATE_FOOTPRINT_T | |
SCH_FIELD_LOCATE_DATASHEET_T | |
SCH_ITEM_LOCATE_WIRE_T | |
SCH_ITEM_LOCATE_BUS_T | |
SCH_ITEM_LOCATE_GRAPHIC_LINE_T | |
SCH_LABEL_LOCATE_ANY_T | |
SCH_LABEL_LOCATE_WIRE_T | |
SCH_LABEL_LOCATE_BUS_T | |
SCH_SYMBOL_LOCATE_POWER_T | |
SCH_LOCATE_ANY_T | |
SCH_SCREEN_T | |
SCHEMATIC_T | |
GERBER_LAYOUT_T | |
GERBER_DRAW_ITEM_T | |
GERBER_IMAGE_T | |
WSG_LINE_T | |
WSG_RECT_T | |
WSG_POLY_T | |
WSG_TEXT_T | |
WSG_BITMAP_T | |
WSG_PAGE_T | |
WS_PROXY_UNDO_ITEM_T | |
WS_PROXY_UNDO_ITEM_PLUS_T | |
SYMBOL_LIB_TABLE_T | |
FP_LIB_TABLE_T | |
DESIGN_BLOCK_LIB_TABLE_T | |
SYMBOL_LIBS_T | |
SEARCH_STACK_T | |
S3D_CACHE_T | |
MAX_STRUCT_TYPE_ID |
Definition at line 77 of file typeinfo.h.
Return the underlying type of the given type.
This is useful for finding the element type given one of the "non-type" types such as SCH_ITEM_LOCATE_WIRE_T.
aType | Given type to resolve. |
Definition at line 249 of file typeinfo.h.
References PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_DIMENSION_T, PCB_FIELD_LOCATE_DATASHEET_T, PCB_FIELD_LOCATE_FOOTPRINT_T, PCB_FIELD_LOCATE_REFERENCE_T, PCB_FIELD_LOCATE_VALUE_T, PCB_FIELD_T, PCB_LOCATE_HOLE_T, PCB_LOCATE_NPTH_T, PCB_LOCATE_PTH_T, PCB_SHAPE_LOCATE_ARC_T, PCB_SHAPE_LOCATE_BEZIER_T, PCB_SHAPE_LOCATE_CIRCLE_T, PCB_SHAPE_LOCATE_POLY_T, PCB_SHAPE_LOCATE_RECT_T, PCB_SHAPE_LOCATE_SEGMENT_T, PCB_SHAPE_T, SCH_FIELD_LOCATE_DATASHEET_T, SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_FIELD_LOCATE_REFERENCE_T, SCH_FIELD_LOCATE_VALUE_T, SCH_FIELD_T, SCH_ITEM_LOCATE_BUS_T, SCH_ITEM_LOCATE_GRAPHIC_LINE_T, SCH_ITEM_LOCATE_WIRE_T, SCH_LABEL_LOCATE_ANY_T, SCH_LABEL_LOCATE_BUS_T, SCH_LABEL_LOCATE_WIRE_T, SCH_LABEL_T, SCH_LINE_T, SCH_SYMBOL_LOCATE_POWER_T, and SCH_SYMBOL_T.
Referenced by DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), EE_RTREE::EE_TYPE::EE_TYPE(), DRC_TEST_PROVIDER::forEachGeometryItem(), FOOTPRINT::GetBoundingBox(), PCB_VIEWER_TOOLS::GraphicOutlines(), PCB_CONTROL::placeBoardItems(), DRC_TEST_PROVIDER_DISALLOW::Run(), PCB_VIEWER_TOOLS::TextOutlines(), and transformFPShapesToPolySet().
Casted dyn_cast | ( | From | aObject | ) |
A lightweight dynamic downcast.
Cast aObject to type Casted*. Uses EDA_ITEM::Type() and #EDA_ITEM::ClassOf() to check if type matches.
aObject | object to be casted. |
Definition at line 61 of file typeinfo.h.
Definition at line 46 of file typeinfo.h.
Check if the type of aObject is T.
aObject | the object for type check. |
Definition at line 40 of file typeinfo.h.
|
constexpr |
Definition at line 367 of file typeinfo.h.
References LIB_SYMBOL_T, SCH_BITMAP_T, SCH_BUS_BUS_ENTRY_T, SCH_BUS_WIRE_ENTRY_T, SCH_DIRECTIVE_LABEL_T, SCH_FIELD_LOCATE_DATASHEET_T, SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_FIELD_LOCATE_REFERENCE_T, SCH_FIELD_LOCATE_VALUE_T, SCH_FIELD_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_ITEM_LOCATE_BUS_T, SCH_ITEM_LOCATE_GRAPHIC_LINE_T, SCH_ITEM_LOCATE_WIRE_T, SCH_JUNCTION_T, SCH_LABEL_LOCATE_ANY_T, SCH_LABEL_LOCATE_BUS_T, SCH_LABEL_LOCATE_WIRE_T, SCH_LABEL_T, SCH_LINE_T, SCH_LOCATE_ANY_T, SCH_MARKER_T, SCH_NO_CONNECT_T, SCH_PIN_T, SCH_RULE_AREA_T, SCH_SCREEN_T, SCH_SHAPE_T, SCH_SHEET_PIN_T, SCH_SHEET_T, SCH_SYMBOL_LOCATE_POWER_T, SCH_SYMBOL_T, SCH_TABLE_T, SCH_TABLECELL_T, SCH_TEXT_T, SCH_TEXTBOX_T, and SCHEMATIC_T.
Referenced by TEST_EE_ITEM_FIXTURE::Instantiate(), and IsTypeCorrect().
|
constexpr |
Definition at line 478 of file typeinfo.h.
References GERBER_DRAW_ITEM_T, GERBER_IMAGE_T, and GERBER_LAYOUT_T.
Referenced by IsTypeCorrect().
|
constexpr |
Definition at line 308 of file typeinfo.h.
References IsNullType(), PCB_DIMENSION_T, PCB_FIELD_LOCATE_DATASHEET_T, PCB_FIELD_LOCATE_FOOTPRINT_T, PCB_FIELD_LOCATE_REFERENCE_T, PCB_FIELD_LOCATE_VALUE_T, PCB_ITEM_LIST_T, PCB_LOCATE_BBVIA_T, PCB_LOCATE_BOARD_EDGE_T, PCB_LOCATE_HOLE_T, PCB_LOCATE_NPTH_T, PCB_LOCATE_PTH_T, PCB_LOCATE_STDVIA_T, PCB_LOCATE_TEXT_T, PCB_LOCATE_UVIA_T, PCB_SHAPE_LOCATE_ARC_T, PCB_SHAPE_LOCATE_BEZIER_T, PCB_SHAPE_LOCATE_CIRCLE_T, PCB_SHAPE_LOCATE_POLY_T, PCB_SHAPE_LOCATE_RECT_T, PCB_SHAPE_LOCATE_SEGMENT_T, SCH_FIELD_LOCATE_DATASHEET_T, SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_FIELD_LOCATE_REFERENCE_T, SCH_FIELD_LOCATE_VALUE_T, SCH_ITEM_LOCATE_BUS_T, SCH_ITEM_LOCATE_GRAPHIC_LINE_T, SCH_ITEM_LOCATE_WIRE_T, SCH_LABEL_LOCATE_ANY_T, SCH_LABEL_LOCATE_BUS_T, SCH_LABEL_LOCATE_WIRE_T, SCH_LOCATE_ANY_T, SCH_SCREEN_T, and SCH_SYMBOL_LOCATE_POWER_T.
Referenced by TEST_EE_ITEM_FIXTURE::Instantiate(), and TEST_BOARD_ITEM_FIXTURE::Instantiate().
|
constexpr |
Definition at line 512 of file typeinfo.h.
References DESIGN_BLOCK_LIB_TABLE_T, FP_LIB_TABLE_T, S3D_CACHE_T, SCREEN_T, SEARCH_STACK_T, SYMBOL_LIB_TABLE_T, and SYMBOL_LIBS_T.
Referenced by IsTypeCorrect().
|
constexpr |
Definition at line 303 of file typeinfo.h.
Referenced by IsInstantiableType(), and IsTypeCorrect().
|
constexpr |
Definition at line 492 of file typeinfo.h.
References WS_PROXY_UNDO_ITEM_PLUS_T, WS_PROXY_UNDO_ITEM_T, WSG_BITMAP_T, WSG_LINE_T, WSG_PAGE_T, WSG_POLY_T, WSG_RECT_T, and WSG_TEXT_T.
Referenced by IsTypeCorrect().
|
constexpr |
Definition at line 421 of file typeinfo.h.
References PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_DIMENSION_T, PCB_FIELD_LOCATE_DATASHEET_T, PCB_FIELD_LOCATE_FOOTPRINT_T, PCB_FIELD_LOCATE_REFERENCE_T, PCB_FIELD_LOCATE_VALUE_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GENERATOR_T, PCB_GROUP_T, PCB_ITEM_LIST_T, PCB_LOCATE_BBVIA_T, PCB_LOCATE_BOARD_EDGE_T, PCB_LOCATE_HOLE_T, PCB_LOCATE_NPTH_T, PCB_LOCATE_PTH_T, PCB_LOCATE_STDVIA_T, PCB_LOCATE_TEXT_T, PCB_LOCATE_UVIA_T, PCB_MARKER_T, PCB_NETINFO_T, PCB_PAD_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_LOCATE_ARC_T, PCB_SHAPE_LOCATE_BEZIER_T, PCB_SHAPE_LOCATE_CIRCLE_T, PCB_SHAPE_LOCATE_POLY_T, PCB_SHAPE_LOCATE_RECT_T, PCB_SHAPE_LOCATE_SEGMENT_T, PCB_SHAPE_T, PCB_T, PCB_TABLE_T, PCB_TABLECELL_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, and PCB_ZONE_T.
Referenced by TEST_BOARD_ITEM_FIXTURE::Instantiate(), and IsTypeCorrect().
|
constexpr |
Definition at line 531 of file typeinfo.h.
References IsEeschemaType(), IsGerbviewType(), IsMiscType(), IsNullType(), IsPageLayoutEditorType(), and IsPcbnewType().
Referenced by BOOST_AUTO_TEST_CASE().