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...
 
virtual bool HasIndexableSubshapes () const
 
virtual size_t GetIndexableSubshapeCount () const
 
virtual void GetIndexableSubshapes (std::vector< SHAPE * > &aSubshapes)
 

Protected Attributes

SHAPE_TYPE m_type
 < type of our shape More...
 

Detailed Description

Definition at line 76 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 82 of file shape.h.

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

◆ ~SHAPE_BASE()

virtual SHAPE_BASE::~SHAPE_BASE ( )
inlinevirtual

Definition at line 86 of file shape.h.

87  {}

Member Function Documentation

◆ GetIndexableSubshapeCount()

virtual size_t SHAPE_BASE::GetIndexableSubshapeCount ( ) const
inlinevirtual

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 104 of file shape.h.

104 { return 0; }

◆ GetIndexableSubshapes()

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

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 106 of file shape.h.

106 { }

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

◆ HasIndexableSubshapes()

virtual bool SHAPE_BASE::HasIndexableSubshapes ( ) const
inlinevirtual

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 99 of file shape.h.

100  {
101  return false;
102  }

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

◆ Type()

SHAPE_TYPE SHAPE_BASE::Type ( ) const
inline

Member Data Documentation

◆ m_type

SHAPE_TYPE SHAPE_BASE::m_type
protected

< type of our shape

Definition at line 110 of file shape.h.

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


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