26 #ifndef __KICAD_TYPEINFO_H 27 #define __KICAD_TYPEINFO_H 31 #include <type_traits> 39 template <
class T,
class I>
40 bool IsA(
const I* aObject )
42 return aObject && std::remove_pointer<T>::type::ClassOf( aObject );
45 template <
class T,
class I>
46 bool IsA(
const I& aObject )
48 return std::remove_pointer<T>::type::ClassOf( &aObject );
60 template<
class Casted,
class From>
63 if( std::remove_pointer<Casted>::type::ClassOf ( aObject ) )
64 return static_cast<Casted>( aObject );
273 #endif // __KICAD_TYPEINFO_H
class ALIGNED_DIMENSION, a linear dimension (graphic item)
class LEADER, a leader dimension (graphic item)
class FP_TEXT, text in a footprint
class PCB_GROUP, a set of BOARD_ITEMs
constexpr KICAD_T BaseType(const KICAD_T aType)
Returns the underlying type of the given type.
class CENTER_DIMENSION, a center point marking (graphic item)
the 3d code uses this value
class PCB_TEXT, text on a layer
class ARC, an arc track segment on a copper layer
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
not really an item, used to identify a screen
class TRACK, a track segment (segment on a copper layer)
class BOARD_ITEM_LIST, a list of board items
class ZONE, a copper pour area
class DIMENSION_BASE: abstract dimension meta-type
class PCB_TARGET, a target (graphic item)
class FOOTPRINT, a footprint
class MARKER_PCB, a marker used to show something
class NETINFO_ITEM, a description of a net
class ZONE, managed by a footprint
A base class for most all the KiCad significant classes used in schematics and boards.
class ORTHOGONAL_DIMENSION, a linear dimension constrained to x/y
class VIA, a via (like a track segment on a copper layer)
class PCB_SHAPE, a segment not on copper layers
bool IsA(const I *aObject)
Checks if the type of aObject is T.