KiCad PCB EDA Suite
SHAPE_BASE Class Reference

#include <shape.h>

Inheritance diagram for SHAPE_BASE:
SHAPE SHAPE_ARC SHAPE_CIRCLE SHAPE_COMPOUND SHAPE_LINE_CHAIN_BASE SHAPE_NULL SHAPE_POLY_SET SHAPE_RECT SHAPE_SEGMENT

Public Member Functions

 SHAPE_BASE (SHAPE_TYPE aType)
 Create an empty shape of type aType. More...
 
virtual ~SHAPE_BASE ()
 
SHAPE_TYPE Type () const
 Return the type of the shape. More...
 
wxString TypeName () const
 
virtual bool HasIndexableSubshapes () const
 
virtual size_t GetIndexableSubshapeCount () const
 
virtual void GetIndexableSubshapes (std::vector< const SHAPE * > &aSubshapes) const
 

Protected Attributes

SHAPE_TYPE m_type
 < type of our shape More...
 

Detailed Description

Definition at line 77 of file shape.h.

Constructor & Destructor Documentation

◆ SHAPE_BASE()

SHAPE_BASE::SHAPE_BASE ( SHAPE_TYPE  aType)
inline

Create an empty shape of type aType.

Definition at line 83 of file shape.h.

83 :
84 m_type( aType )
85 {}
SHAPE_TYPE m_type
< type of our shape
Definition: shape.h:116

◆ ~SHAPE_BASE()

virtual SHAPE_BASE::~SHAPE_BASE ( )
inlinevirtual

Definition at line 87 of file shape.h.

88 {}

Member Function Documentation

◆ GetIndexableSubshapeCount()

virtual size_t SHAPE_BASE::GetIndexableSubshapeCount ( ) const
inlinevirtual

Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.

Definition at line 110 of file shape.h.

110{ return 0; }

Referenced by SHAPE::GetClearance().

◆ GetIndexableSubshapes()

virtual void SHAPE_BASE::GetIndexableSubshapes ( std::vector< const SHAPE * > &  aSubshapes) const
inlinevirtual

Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.

Definition at line 112 of file shape.h.

112{ }

Referenced by SHAPE_COMPOUND::AddShape(), SHAPE::GetClearance(), and ROUTER_PREVIEW_ITEM::ViewDraw().

◆ HasIndexableSubshapes()

virtual bool SHAPE_BASE::HasIndexableSubshapes ( ) const
inlinevirtual

Reimplemented in SHAPE_COMPOUND, and SHAPE_POLY_SET.

Definition at line 105 of file shape.h.

106 {
107 return false;
108 }

Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().

◆ Type()

◆ TypeName()

wxString SHAPE_BASE::TypeName ( ) const
inline

Definition at line 100 of file shape.h.

101 {
102 return SHAPE_TYPE_asString( m_type );
103 }
static wxString SHAPE_TYPE_asString(SHAPE_TYPE a)
Definition: shape.h:56

References m_type, and SHAPE_TYPE_asString().

Referenced by Collide().

Member Data Documentation

◆ m_type

SHAPE_TYPE SHAPE_BASE::m_type
protected

< type of our shape

Definition at line 116 of file shape.h.

Referenced by SHAPE::IsNull(), Type(), and TypeName().


The documentation for this class was generated from the following file: