KiCad PCB EDA Suite
typeinfo.h File Reference
#include <cstdio>

Go to the source code of this file.

Classes

struct  remove_pointer< T >
 
struct  remove_pointer< T * >
 

Enumerations

enum  KICAD_T {
  NOT_USED = -1, EOT = 0, TYPE_NOT_INIT = 0, PCB_T,
  SCREEN_T, PCB_MODULE_T, PCB_PAD_T, PCB_LINE_T,
  PCB_TEXT_T, PCB_MODULE_TEXT_T, PCB_MODULE_EDGE_T, PCB_TRACE_T,
  PCB_VIA_T, PCB_ZONE_T, PCB_MARKER_T, PCB_DIMENSION_T,
  PCB_TARGET_T, PCB_ZONE_AREA_T, PCB_ITEM_LIST_T, PCB_NETINFO_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_TEXT_T,
  SCH_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIERARCHICAL_LABEL_T, SCH_FIELD_T,
  SCH_COMPONENT_T, SCH_SHEET_PIN_T, SCH_SHEET_T, SCH_FIELD_LOCATE_REFERENCE_T,
  SCH_FIELD_LOCATE_VALUE_T, SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_SCREEN_T, LIB_PART_T,
  LIB_ALIAS_T, LIB_ARC_T, LIB_CIRCLE_T, LIB_TEXT_T,
  LIB_RECTANGLE_T, LIB_POLYLINE_T, LIB_BEZIER_T, LIB_PIN_T,
  LIB_FIELD_T, GERBER_LAYOUT_T, GERBER_DRAW_ITEM_T, GERBER_IMAGE_LIST_T,
  GERBER_IMAGE_T, TYPE_PL_EDITOR_LAYOUT, MAX_STRUCT_TYPE_ID
}
 Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType. More...
 

Functions

template<class T , class I >
bool IsA (const I *aObject)
 Function IsA() More...
 
template<class T , class I >
bool IsA (const I &aObject)
 
template<class Casted , class From >
Casted dyn_cast (From aObject)
 Function dyn_cast() More...
 

Enumeration Type Documentation

enum KICAD_T

Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.

Enumerator
NOT_USED 

the 3d code uses this value

EOT 

search types array terminator (End Of Types)

TYPE_NOT_INIT 
PCB_T 
SCREEN_T 

not really an item, used to identify a screen

PCB_MODULE_T 

class MODULE, a footprint

PCB_PAD_T 

class D_PAD, a pad in a footprint

PCB_LINE_T 

class DRAWSEGMENT, a segment not on copper layers

PCB_TEXT_T 

class TEXTE_PCB, text on a layer

PCB_MODULE_TEXT_T 

class TEXTE_MODULE, text in a footprint

PCB_MODULE_EDGE_T 

class EDGE_MODULE, a footprint edge

PCB_TRACE_T 

class TRACK, a track segment (segment on a copper layer)

PCB_VIA_T 

class VIA, a via (like a track segment on a copper layer)

PCB_ZONE_T 

class SEGZONE, a segment used to fill a zone area (segment on a copper layer)

PCB_MARKER_T 

class MARKER_PCB, a marker used to show something

PCB_DIMENSION_T 

class DIMENSION, a dimension (graphic item)

PCB_TARGET_T 

class PCB_TARGET, a target (graphic item)

PCB_ZONE_AREA_T 

class ZONE_CONTAINER, a zone 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

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_TEXT_T 
SCH_LABEL_T 
SCH_GLOBAL_LABEL_T 
SCH_HIERARCHICAL_LABEL_T 
SCH_FIELD_T 
SCH_COMPONENT_T 
SCH_SHEET_PIN_T 
SCH_SHEET_T 
SCH_FIELD_LOCATE_REFERENCE_T 
SCH_FIELD_LOCATE_VALUE_T 
SCH_FIELD_LOCATE_FOOTPRINT_T 
SCH_SCREEN_T 
LIB_PART_T 
LIB_ALIAS_T 
LIB_ARC_T 
LIB_CIRCLE_T 
LIB_TEXT_T 
LIB_RECTANGLE_T 
LIB_POLYLINE_T 
LIB_BEZIER_T 
LIB_PIN_T 
LIB_FIELD_T 
GERBER_LAYOUT_T 
GERBER_DRAW_ITEM_T 
GERBER_IMAGE_LIST_T 
GERBER_IMAGE_T 
TYPE_PL_EDITOR_LAYOUT 
MAX_STRUCT_TYPE_ID 

Definition at line 90 of file typeinfo.h.

91 {
92  NOT_USED = -1,
93 
94  EOT = 0,
95 
96  TYPE_NOT_INIT = 0,
97  PCB_T,
98  SCREEN_T,
99 
100  // Items in pcb
101  PCB_MODULE_T,
102  PCB_PAD_T,
103  PCB_LINE_T,
104  PCB_TEXT_T,
107  PCB_TRACE_T,
108  PCB_VIA_T,
109  PCB_ZONE_T,
110  PCB_MARKER_T,
113  PCB_TARGET_T,
116  PCB_NETINFO_T,
117 
118  // Schematic draw Items. The order of these items effects the sort order.
119  // It is currently ordered to mimic the old Eeschema locate behavior where
120  // the smallest item is the selected item.
121  SCH_MARKER_T,
126  SCH_LINE_T,
127  SCH_BITMAP_T,
128  SCH_TEXT_T,
129  SCH_LABEL_T,
132  SCH_FIELD_T,
135  SCH_SHEET_T,
136 
137  // Be prudent with these 3 types:
138  // they should be used only to locate a specific field type
139  // among SCH_FIELD_T items types
143 
144  // General
145  SCH_SCREEN_T,
146 
147  /*
148  * Draw items in library component.
149  *
150  * The order of these items effects the sort order for items inside the
151  * "DRAW/ENDDRAW" section of the component definition in a library file.
152  * If you add a new draw item, type, please make sure you add it so the
153  * sort order is logical.
154  */
155  LIB_PART_T,
156  LIB_ALIAS_T,
157  LIB_ARC_T,
158  LIB_CIRCLE_T,
159  LIB_TEXT_T,
162  LIB_BEZIER_T,
163  LIB_PIN_T,
164 
165  /*
166  * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item
167  * types before this line.
168  */
169  LIB_FIELD_T,
170 
171  /*
172  * For GerbView: items type:
173  */
178 
179  /*
180  * for Pl_Editor, in undo/redo commands
181  */
183 
184  // End value
186 };
Definition: typeinfo.h:97
the 3d code uses this value
Definition: typeinfo.h:92
class ZONE_CONTAINER, a zone area
Definition: typeinfo.h:114
class TEXTE_PCB, text on a layer
Definition: typeinfo.h:104
class D_PAD, a pad in a footprint
Definition: typeinfo.h:102
class EDGE_MODULE, a footprint edge
Definition: typeinfo.h:106
search types array terminator (End Of Types)
Definition: typeinfo.h:94
not really an item, used to identify a screen
Definition: typeinfo.h:98
class TRACK, a track segment (segment on a copper layer)
Definition: typeinfo.h:107
class MODULE, a footprint
Definition: typeinfo.h:101
class BOARD_ITEM_LIST, a list of board items
Definition: typeinfo.h:115
class SEGZONE, a segment used to fill a zone area (segment on a copper layer)
Definition: typeinfo.h:109
class DIMENSION, a dimension (graphic item)
Definition: typeinfo.h:112
class PCB_TARGET, a target (graphic item)
Definition: typeinfo.h:113
class TEXTE_MODULE, text in a footprint
Definition: typeinfo.h:105
class MARKER_PCB, a marker used to show something
Definition: typeinfo.h:111
class NETINFO_ITEM, a description of a net
Definition: typeinfo.h:116
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:108
class DRAWSEGMENT, a segment not on copper layers
Definition: typeinfo.h:103

Function Documentation

template<class Casted , class From >
Casted dyn_cast ( From  aObject)
template<class T , class I >
bool IsA ( const I *  aObject)

Function IsA()

Checks if the type of aObject is T.

Parameters
aObjectobject for type check
Returns
true, if aObject type equals T.

Definition at line 53 of file typeinfo.h.

54 {
55  return aObject && remove_pointer<T>::type::ClassOf( aObject );
56 }
template<class T , class I >
bool IsA ( const I &  aObject)

Definition at line 59 of file typeinfo.h.

60 {
61  return remove_pointer<T>::type::ClassOf( &aObject );
62 }