KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ARRAY_OPTIONS Class Referenceabstract

Options that govern the setup of an "array" of multiple item. More...

#include <array_options.h>

Inheritance diagram for ARRAY_OPTIONS:
ARRAY_CIRCULAR_OPTIONS ARRAY_GRID_OPTIONS

Classes

struct  TRANSFORM
 Transform applied to an object by this array. More...
 

Public Types

enum  ARRAY_TYPE_T { ARRAY_GRID , ARRAY_CIRCULAR }
 

Public Member Functions

 ARRAY_OPTIONS (ARRAY_TYPE_T aType)
 
virtual ~ARRAY_OPTIONS ()
 
virtual TRANSFORM GetTransform (int aN, const VECTOR2I &aPos) const =0
 Get the transform of the n-th point in the array.
 
virtual int GetArraySize () const =0
 The number of points in this array.
 
virtual wxString GetItemNumber (int n) const =0
 Get the position number (name) for the n'th array point.
 
bool ShouldNumberItems () const
 
void SetShouldNumber (bool aShouldNumber)
 
bool ShouldReannotateFootprints () const
 
void SetSShouldReannotateFootprints (bool aShouldReannotate)
 
bool GetNumberingStartIsSpecified () const
 
void SetNumberingStartIsSpecified (bool aIsSpecified)
 

Protected Attributes

ARRAY_TYPE_T m_type
 
bool m_shouldNumber
 True if this array numbers the new items.
 
bool m_reannotateFootprints
 True if this array will rename any footprints to be unique.
 
bool m_numberingStartIsSpecified
 True if this array's number starts from the preset point False if the array numbering starts from some externally provided point.
 

Detailed Description

Options that govern the setup of an "array" of multiple item.

The base ARRAY_OPTIONS do not encode a specific geometry or numbering method, this is done by derived classes.

Definition at line 37 of file array_options.h.

Member Enumeration Documentation

◆ ARRAY_TYPE_T

Enumerator
ARRAY_GRID 

A grid (x*y) array.

ARRAY_CIRCULAR 

A circular array.

Definition at line 40 of file array_options.h.

Constructor & Destructor Documentation

◆ ARRAY_OPTIONS()

ARRAY_OPTIONS::ARRAY_OPTIONS ( ARRAY_TYPE_T  aType)
inline

Definition at line 46 of file array_options.h.

◆ ~ARRAY_OPTIONS()

virtual ARRAY_OPTIONS::~ARRAY_OPTIONS ( )
inlinevirtual

Definition at line 54 of file array_options.h.

Member Function Documentation

◆ GetArraySize()

virtual int ARRAY_OPTIONS::GetArraySize ( ) const
pure virtual

The number of points in this array.

Implemented in ARRAY_GRID_OPTIONS, and ARRAY_CIRCULAR_OPTIONS.

Referenced by CheckArrayNumbering(), and CheckArrayTransforms().

◆ GetItemNumber()

virtual wxString ARRAY_OPTIONS::GetItemNumber ( int  n) const
pure virtual

Get the position number (name) for the n'th array point.

Parameters
narray point index, from 0 to GetArraySize() - 1
Returns
the point's name

Implemented in ARRAY_GRID_OPTIONS, and ARRAY_CIRCULAR_OPTIONS.

Referenced by CheckArrayNumbering(), and ARRAY_PAD_NUMBER_PROVIDER::getNextNumber().

◆ GetNumberingStartIsSpecified()

bool ARRAY_OPTIONS::GetNumberingStartIsSpecified ( ) const
inline
Returns
is the numbering is enabled and should start at a point specified in these options or is it implicit according to the calling code?

Definition at line 118 of file array_options.h.

Referenced by ARRAY_PAD_NUMBER_PROVIDER::ARRAY_PAD_NUMBER_PROVIDER().

◆ GetTransform()

virtual TRANSFORM ARRAY_OPTIONS::GetTransform ( int  aN,
const VECTOR2I aPos 
) const
pure virtual

Get the transform of the n-th point in the array.

Parameters
aNthe index of the array point (0 is the original point)
aPosthe existing item position
Returns
a transform (an offset and a rotation)

Implemented in ARRAY_GRID_OPTIONS, and ARRAY_CIRCULAR_OPTIONS.

Referenced by CheckArrayTransforms(), and TransformItem().

◆ SetNumberingStartIsSpecified()

void ARRAY_OPTIONS::SetNumberingStartIsSpecified ( bool  aIsSpecified)
inline

Definition at line 123 of file array_options.h.

◆ SetShouldNumber()

void ARRAY_OPTIONS::SetShouldNumber ( bool  aShouldNumber)
inline

Definition at line 94 of file array_options.h.

◆ SetSShouldReannotateFootprints()

void ARRAY_OPTIONS::SetSShouldReannotateFootprints ( bool  aShouldReannotate)
inline

Definition at line 108 of file array_options.h.

◆ ShouldNumberItems()

bool ARRAY_OPTIONS::ShouldNumberItems ( ) const
inline
Returns
are the items in this array numbered, or are all the items numbered the same?

Definition at line 89 of file array_options.h.

◆ ShouldReannotateFootprints()

bool ARRAY_OPTIONS::ShouldReannotateFootprints ( ) const
inline
Returns
are the footprints in this array reannotated to be unique (true), or do they keep the original annotation (false)?

Definition at line 103 of file array_options.h.

Member Data Documentation

◆ m_numberingStartIsSpecified

bool ARRAY_OPTIONS::m_numberingStartIsSpecified
protected

True if this array's number starts from the preset point False if the array numbering starts from some externally provided point.

Definition at line 140 of file array_options.h.

◆ m_reannotateFootprints

bool ARRAY_OPTIONS::m_reannotateFootprints
protected

True if this array will rename any footprints to be unique.

Definition at line 136 of file array_options.h.

◆ m_shouldNumber

bool ARRAY_OPTIONS::m_shouldNumber
protected

True if this array numbers the new items.

Definition at line 133 of file array_options.h.

◆ m_type

ARRAY_TYPE_T ARRAY_OPTIONS::m_type
protected

Definition at line 130 of file array_options.h.


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