KiCad PCB EDA Suite
SCH_COLLECTOR Class Reference

Class SCH_COLLECTOR. More...

#include <sch_collectors.h>

Inheritance diagram for SCH_COLLECTOR:
COLLECTOR SCH_TYPE_COLLECTOR

Public Member Functions

 SCH_COLLECTOR (const KICAD_T *aScanTypes=SCH_COLLECTOR::AllItems)
 Constructor SCH_COLLECTOR. More...
 
SCH_ITEMoperator[] (int aIndex) const
 Overload COLLECTOR::operator[](int) to return a SCH_ITEM instead of an EDA_ITEM. More...
 
SEARCH_RESULT Inspect (EDA_ITEM *aItem, void *aTestData) override
 
void Collect (SCH_ITEM *aItem, const KICAD_T aFilterList[], const wxPoint &aPosition)
 Function Collect scans a SCH_ITEM using this class's Inspector method, which does the collection. More...
 
bool IsCorner () const
 Function IsCorner tests if the collected items forms as corner of two line segments. More...
 
bool IsNode (bool aIncludePins=true) const
 Function IsNode tests if the collected items form a node. More...
 
bool IsDraggableJunction () const
 Function IsDraggableJunction tests to see if the collected items form a draggable junction. More...
 
bool IsValidIndex (int aIndex)
 Function IsValidIndex tests if aIndex is with the limits of the list of collected items. More...
 
int GetCount () const
 Function GetCount returns the number of objects in the list. More...
 
void Empty ()
 Function Empty sets the list to empty. More...
 
void Append (EDA_ITEM *item)
 Function Append adds an item to the end of the list. More...
 
void Remove (int aIndex)
 Function Remove removes the item at aIndex (first position is 0);. More...
 
void Remove (const EDA_ITEM *aItem)
 Function Remove removes the item aItem (if exists in the collector). More...
 
EDA_ITEM *const * BasePtr () const
 Function BasePtr returns the address of the first element in the array. More...
 
bool HasItem (const EDA_ITEM *aItem) const
 Function HasItem tests if aItem has already been collected. More...
 
void SetScanTypes (const KICAD_T *scanTypes)
 Function SetScanTypes records the list of KICAD_T types to consider for collection by the Inspect() function. More...
 
void SetTimeNow ()
 
time_t GetTime ()
 
void SetRefPos (const wxPoint &aRefPos)
 
const wxPointGetRefPos () const
 
void SetBoundingBox (const EDA_RECT &aRefBox)
 
const EDA_RECTGetBoundingBox () const
 
bool IsSimilarPointAndTime (const wxPoint &aRefPos)
 Function IsSimilarPointAndTime returns true if the given reference point is "similar" (defined here) to the internal reference point and the current time is within a few seconds of the internal m_TimeAtCollection. More...
 
int CountType (KICAD_T aType)
 Function CountType counts the number of items matching aType. More...
 

Static Public Attributes

static const KICAD_T AllItems []
 A scan list for all schematic items. More...
 
static const KICAD_T EditableItems []
 A scan list for all editable schematic items. More...
 
static const KICAD_T CmpFieldValueOnly []
 A scan list for a specific editable field: Value. More...
 
static const KICAD_T CmpFieldReferenceOnly []
 A scan list for a specific editable field: Reference. More...
 
static const KICAD_T CmpFieldFootprintOnly []
 A scan list for a specific editable field: Footprint. More...
 
static const KICAD_T MovableItems []
 A scan list for all movable schematic items. More...
 
static const KICAD_T DraggableItems []
 A scan list for all draggable schematic items. More...
 
static const KICAD_T RotatableItems []
 A scan list for all rotatable schematic items. More...
 
static const KICAD_T ParentItems []
 A scan list for only parent schematic items. More...
 
static const KICAD_T AllItemsButPins []
 A scan list for all schematic items except pins. More...
 
static const KICAD_T ComponentsOnly []
 A scan list for schematic component items only. More...
 
static const KICAD_T SheetsOnly []
 A scan list for schematic sheet items only. More...
 
static const KICAD_T SheetsAndSheetLabels []
 A scan list for schematic sheet and sheet label items. More...
 
static const KICAD_T OrientableItems []
 A scan list for schematic items that can be mirrored. More...
 
static const KICAD_T CopyableItems []
 A scan list for schematic items that can be copied/duplicated. More...
 

Protected Attributes

INSPECTOR_FUNC m_inspector
 a class common bridge into the polymorphic Inspect() More...
 
const KICAD_Tm_ScanTypes
 Which object types to scan. More...
 
std::vector< EDA_ITEM * > m_List
 A place to hold collected objects without taking ownership of their memory. More...
 
wxPoint m_RefPos
 A point to test against, and that was used to make the collection. More...
 
EDA_RECT m_RefBox
 A bounding box to test against, and that was used to make the collection. More...
 
time_t m_TimeAtCollection
 The time at which the collection was made. More...
 

Detailed Description

Class SCH_COLLECTOR.

Definition at line 41 of file sch_collectors.h.

Constructor & Destructor Documentation

SCH_COLLECTOR::SCH_COLLECTOR ( const KICAD_T aScanTypes = SCH_COLLECTOR::AllItems)
inline

Constructor SCH_COLLECTOR.

Definition at line 123 of file sch_collectors.h.

References COLLECTOR::SetScanTypes().

124  {
125  SetScanTypes( aScanTypes );
126  }
void SetScanTypes(const KICAD_T *scanTypes)
Function SetScanTypes records the list of KICAD_T types to consider for collection by the Inspect() f...

Member Function Documentation

void COLLECTOR::Append ( EDA_ITEM item)
inlineinherited

Function Append adds an item to the end of the list.

Parameters
itemAn EDA_ITEM* to add.

Definition at line 126 of file class_collector.h.

Referenced by GENERAL_COLLECTOR::Collect(), SELECTION_TOOL::guessSelectionCandidates(), LIB_COLLECTOR::Inspect(), GERBER_COLLECTOR::Inspect(), Inspect(), GENERAL_COLLECTOR::Inspect(), SCH_FIND_COLLECTOR::Inspect(), SCH_TYPE_COLLECTOR::Inspect(), PCB_TYPE_COLLECTOR::Inspect(), and PCB_LAYER_COLLECTOR::Inspect().

127  {
128  m_List.push_back( item );
129  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
EDA_ITEM* const* COLLECTOR::BasePtr ( ) const
inlineinherited

Function BasePtr returns the address of the first element in the array.

Only call this if there is at least one element in the vector m_List, otherwise a C++ exception should get thrown.

Definition at line 178 of file class_collector.h.

179  {
180  return &m_List[0];
181  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
void SCH_COLLECTOR::Collect ( SCH_ITEM aItem,
const KICAD_T  aFilterList[],
const wxPoint aPosition 
)

Function Collect scans a SCH_ITEM using this class's Inspector method, which does the collection.

Parameters
aItemA SCH_ITEM to scan.
aFilterListA list of KICAD_T types with a terminating EOT, that determines what is to be collected and the priority order of the resulting collection.
aPositionA wxPoint to use in hit-testing.

Definition at line 243 of file sch_collectors.cpp.

References COLLECTOR::Empty(), EDA_ITEM::IterateForward(), COLLECTOR::m_inspector, COLLECTOR::m_ScanTypes, COLLECTOR::SetRefPos(), and COLLECTOR::SetScanTypes().

Referenced by SCH_EDIT_FRAME::LocateItem().

245 {
246  Empty(); // empty the collection just in case
247 
248  SetScanTypes( aFilterList );
249 
250  // remember where the snapshot was taken from and pass refPos to the Inspect() function.
251  SetRefPos( aPosition );
252 
254 }
void Empty()
Function Empty sets the list to empty.
static SEARCH_RESULT IterateForward(EDA_ITEM *listStart, INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
Function IterateForward walks through the object tree calling the inspector() on each object type req...
void SetScanTypes(const KICAD_T *scanTypes)
Function SetScanTypes records the list of KICAD_T types to consider for collection by the Inspect() f...
INSPECTOR_FUNC m_inspector
a class common bridge into the polymorphic Inspect()
void SetRefPos(const wxPoint &aRefPos)
const KICAD_T * m_ScanTypes
Which object types to scan.
int COLLECTOR::CountType ( KICAD_T  aType)
inlineinherited

Function CountType counts the number of items matching aType.

Parameters
aTypetype we are interested in
Returns
number of occurences

Definition at line 258 of file class_collector.h.

Referenced by SELECTION_TOOL::guessSelectionCandidates().

259  {
260  int cnt = 0;
261  for( size_t i = 0; i < m_List.size(); i++ )
262  {
263  if( m_List[i]->Type() == aType )
264  cnt++;
265  }
266  return cnt;
267  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
void COLLECTOR::Empty ( )
inlineinherited

Function Empty sets the list to empty.

Definition at line 116 of file class_collector.h.

Referenced by LIB_COLLECTOR::Collect(), GERBER_COLLECTOR::Collect(), Collect(), GENERAL_COLLECTOR::Collect(), SCH_TYPE_COLLECTOR::Collect(), PCB_TYPE_COLLECTOR::Collect(), PCB_LAYER_COLLECTOR::Collect(), SCH_FIND_COLLECTOR::Empty(), MODULE_EDITOR_TOOLS::EnumeratePads(), and SELECTION_TOOL::guessSelectionCandidates().

117  {
118  m_List.clear();
119  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
const EDA_RECT& COLLECTOR::GetBoundingBox ( ) const
inlineinherited

Definition at line 227 of file class_collector.h.

References COLLECTOR::m_RefBox.

227 { return m_RefBox; }
EDA_RECT m_RefBox
A bounding box to test against, and that was used to make the collection.
const wxPoint& COLLECTOR::GetRefPos ( ) const
inlineinherited

Definition at line 224 of file class_collector.h.

References COLLECTOR::m_RefPos.

Referenced by PCB_EDIT_FRAME::OnRightClick().

224 { return m_RefPos; }
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
time_t COLLECTOR::GetTime ( )
inlineinherited

Definition at line 218 of file class_collector.h.

References COLLECTOR::m_TimeAtCollection.

219  {
220  return m_TimeAtCollection;
221  }
time_t m_TimeAtCollection
The time at which the collection was made.
bool COLLECTOR::HasItem ( const EDA_ITEM aItem) const
inlineinherited

Function HasItem tests if aItem has already been collected.

Parameters
aItemThe EDA_ITEM* to be tested.
Returns
True if aItem is already collected.

Definition at line 190 of file class_collector.h.

191  {
192  for( size_t i = 0; i < m_List.size(); i++ )
193  {
194  if( m_List[i] == aItem )
195  return true;
196  }
197 
198  return false;
199  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
SEARCH_RESULT SCH_COLLECTOR::Inspect ( EDA_ITEM aItem,
void *  aTestData 
)
overridevirtual

Implements COLLECTOR.

Reimplemented in SCH_TYPE_COLLECTOR.

Definition at line 213 of file sch_collectors.cpp.

References COLLECTOR::Append(), SCH_COMPONENT::GetPosition(), SCH_COMPONENT::GetTransform(), EDA_ITEM::HitTest(), TRANSFORM::InverseTransform(), LIB_PIN_T, COLLECTOR::m_RefPos, SCH_COMPONENT_T, SEARCH_CONTINUE, TRANSFORM::TransformCoordinate(), EDA_ITEM::Type(), and wxPoint::y.

214 {
215  if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
216  return SEARCH_CONTINUE;
217 
218  // Pins have special hit testing requirements that are relative to their parent
219  // SCH_COMPONENT item.
220  if( aItem->Type() == LIB_PIN_T )
221  {
222  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
223  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
224 
225  // Pin hit testing is relative to the components position and orientation in the
226  // schematic. The hit test position must be converted to library coordinates.
227  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
228  TRANSFORM transform = component->GetTransform().InverseTransform();
229  wxPoint position = transform.TransformCoordinate( m_RefPos - component->GetPosition() );
230 
231  position.y *= -1; // Y axis polarity in schematic is inverted from library.
232 
233  if( !aItem->HitTest( position ) )
234  return SEARCH_CONTINUE;
235  }
236 
237  Append( aItem );
238 
239  return SEARCH_CONTINUE;
240 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
TRANSFORM & GetTransform() const
void Append(EDA_ITEM *item)
Function Append adds an item to the end of the list.
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
virtual bool HitTest(const wxPoint &aPosition) const
Function HitTest tests if aPosition is contained within or on the bounding area of an item...
Definition: base_struct.h:302
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
wxPoint GetPosition() const override
Function GetPosition.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:165
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
TRANSFORM InverseTransform() const
Calculate the Inverse mirror/rotation transform.
Definition: transform.cpp:58
bool SCH_COLLECTOR::IsCorner ( ) const

Function IsCorner tests if the collected items forms as corner of two line segments.

Returns
True if the collected items form a corner of two line segments.

Definition at line 257 of file sch_collectors.cpp.

References COLLECTOR::GetCount(), COLLECTOR::m_List, and SCH_LINE_T.

Referenced by SCH_EDIT_FRAME::LocateItem(), and SCH_EDIT_FRAME::OnDragItem().

258 {
259  if( GetCount() != 2 )
260  return false;
261 
262  bool is_busentry0 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[0] ) != NULL);
263  bool is_busentry1 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[1] ) != NULL);
264 
265  if( (m_List[0]->Type() == SCH_LINE_T) && (m_List[1]->Type() == SCH_LINE_T) )
266  return true;
267 
268  if( (m_List[0]->Type() == SCH_LINE_T) && is_busentry1 )
269  return true;
270 
271  if( is_busentry0 && (m_List[1]->Type() == SCH_LINE_T) )
272  return true;
273 
274  return false;
275 }
int GetCount() const
Function GetCount returns the number of objects in the list.
Base class for a bus or wire entry.
Definition: sch_bus_entry.h:41
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
bool SCH_COLLECTOR::IsDraggableJunction ( ) const

Function IsDraggableJunction tests to see if the collected items form a draggable junction.

Daggable junctions are defined as:

  • The intersection of three or more wire end points.
  • The intersection of one or more wire end point and one wire mid point.
  • The crossing of two or more wire mid points and a junction.
Returns
True if the collection is a draggable junction.

Definition at line 312 of file sch_collectors.cpp.

References SCH_ITEM::GetLayer(), SCH_LINE::IsEndPoint(), LAYER_WIRE, COLLECTOR::m_List, COLLECTOR::m_RefPos, SCH_JUNCTION_T, SCH_LINE_T, and EDA_ITEM::Type().

Referenced by SCH_EDIT_FRAME::addJunctionMenuEntries(), SCH_EDIT_FRAME::LocateItem(), and SCH_EDIT_FRAME::OnDragItem().

313 {
314  int wireEndCount = 0;
315  int wireMidPoint = 0;
316  int junctionCount = 0;
317 
318  for( size_t i = 0; i < m_List.size(); i++ )
319  {
320  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
321  KICAD_T type = item->Type();
322 
323  if( type == SCH_JUNCTION_T )
324  {
325  junctionCount++;
326  continue;
327  }
328 
329  if( type == SCH_LINE_T )
330  {
331  if( item->GetLayer() != LAYER_WIRE )
332  return false;
333 
334  SCH_LINE* line = (SCH_LINE*) item;
335 
336  if( line->IsEndPoint( m_RefPos ) )
337  wireEndCount++;
338  else
339  wireMidPoint++;
340 
341  continue;
342  }
343 
344  // Any other item types indicate that this collection is not a draggable junction.
345  return false;
346  }
347 
348  return (wireEndCount >= 3) || ((wireEndCount >= 1) && (wireMidPoint == 1))
349  || ((wireMidPoint >= 2) && (junctionCount == 1));
350 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
bool IsEndPoint(const wxPoint &aPoint) const
Definition: sch_line.h:69
Segment description base class to describe items which have 2 end points (track, wire, draw line ...)
Definition: sch_line.h:41
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
bool SCH_COLLECTOR::IsNode ( bool  aIncludePins = true) const

Function IsNode tests if the collected items form a node.

Parameters
aIncludePinsIndicate if component pin items should be included in the test.
Returns
True if the collected items form a node.

Definition at line 278 of file sch_collectors.cpp.

References SCH_ITEM::GetLayer(), LAYER_WIRE, LIB_PIN_T, COLLECTOR::m_List, SCH_JUNCTION_T, SCH_LINE_T, and EDA_ITEM::Type().

Referenced by SCH_EDIT_FRAME::LocateItem(), and SCH_EDIT_FRAME::OnDragItem().

279 {
280  for( size_t i = 0; i < m_List.size(); i++ )
281  {
282  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
283  KICAD_T type = item->Type();
284 
285  if( type == SCH_JUNCTION_T )
286  continue;
287 
288  if( type == SCH_LINE_T )
289  {
290  if( item->GetLayer() != LAYER_WIRE )
291  return false;
292 
293  continue;
294  }
295 
296  if( type == LIB_PIN_T )
297  {
298  if( !aIncludePins )
299  return false;
300 
301  continue;
302  }
303 
304  // Any other item types indicate that this collection is not a node.
305  return false;
306  }
307 
308  return true;
309 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
bool COLLECTOR::IsSimilarPointAndTime ( const wxPoint aRefPos)
inlineinherited

Function IsSimilarPointAndTime returns true if the given reference point is "similar" (defined here) to the internal reference point and the current time is within a few seconds of the internal m_TimeAtCollection.

Parameters
aRefPosA wxPoint to compare to.
Returns
bool - true if the point and time are similar, else false.

Definition at line 238 of file class_collector.h.

References abs, GetNewTimeStamp(), wxPoint::x, and wxPoint::y.

239  {
240  const int distMax = 2; // adjust these here
241  const time_t timeMax = 3; // seconds
242 
243  int dx = abs( aRefPos.x - m_RefPos.x );
244  int dy = abs( aRefPos.y - m_RefPos.y );
245 
246  if( dx <= distMax && dy <= distMax &&
247  (int)GetNewTimeStamp() - m_TimeAtCollection <= timeMax )
248  return true;
249  else
250  return false;
251  }
time_t GetNewTimeStamp()
Definition: common.cpp:166
#define abs(a)
Definition: auxiliary.h:84
time_t m_TimeAtCollection
The time at which the collection was made.
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
bool COLLECTOR::IsValidIndex ( int  aIndex)
inlineinherited

Function IsValidIndex tests if aIndex is with the limits of the list of collected items.

Parameters
aIndexThe index to test.
Returns
True if aIndex is with the limits of the list of collected items, otherwise false.

Definition at line 98 of file class_collector.h.

Referenced by SCH_FIND_COLLECTOR::GetText(), and SCH_FIND_COLLECTOR::ReplaceItem().

99  {
100  return ( (unsigned) aIndex < m_List.size() );
101  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
SCH_ITEM* SCH_COLLECTOR::operator[] ( int  aIndex) const
inline

Overload COLLECTOR::operator[](int) to return a SCH_ITEM instead of an EDA_ITEM.

Parameters
aIndexThe index into the list.
Returns
SCH_ITEM* at aIndex or NULL.

Definition at line 134 of file sch_collectors.h.

References COLLECTOR::GetCount(), and COLLECTOR::m_List.

135  {
136  if( (unsigned)aIndex < (unsigned)GetCount() )
137  return (SCH_ITEM*) m_List[ aIndex ];
138 
139  return NULL;
140  }
int GetCount() const
Function GetCount returns the number of objects in the list.
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
void COLLECTOR::Remove ( int  aIndex)
inlineinherited

Function Remove removes the item at aIndex (first position is 0);.

Parameters
aIndexThe index into the list.

Definition at line 136 of file class_collector.h.

Referenced by SELECTION_TOOL::guessSelectionCandidates(), PCB_BASE_FRAME::PcbGeneralLocateAndDisplay(), GERBVIEW_SELECTION_TOOL::selectPoint(), and SELECTION_TOOL::selectPoint().

137  {
138  m_List.erase( m_List.begin() + aIndex );
139  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
void COLLECTOR::Remove ( const EDA_ITEM aItem)
inlineinherited

Function Remove removes the item aItem (if exists in the collector).

Parameters
aItemthe item to be removed.

Definition at line 146 of file class_collector.h.

147  {
148  for( size_t i = 0; i < m_List.size(); i++ )
149  {
150  if( m_List[i] == aItem )
151  {
152  m_List.erase( m_List.begin() + i);
153  return;
154  }
155  }
156  }
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
void COLLECTOR::SetBoundingBox ( const EDA_RECT aRefBox)
inlineinherited

Definition at line 226 of file class_collector.h.

226 { m_RefBox = aRefBox; }
EDA_RECT m_RefBox
A bounding box to test against, and that was used to make the collection.
void COLLECTOR::SetRefPos ( const wxPoint aRefPos)
inlineinherited

Definition at line 223 of file class_collector.h.

Referenced by LIB_COLLECTOR::Collect(), GERBER_COLLECTOR::Collect(), Collect(), and GENERAL_COLLECTOR::Collect().

223 { m_RefPos = aRefPos; }
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
void COLLECTOR::SetScanTypes ( const KICAD_T scanTypes)
inlineinherited

Function SetScanTypes records the list of KICAD_T types to consider for collection by the Inspect() function.

Parameters
scanTypesAn array of KICAD_T, terminated by EOT. No copy is is made of this array (so cannot come from caller's stack).

Definition at line 208 of file class_collector.h.

Referenced by LIB_COLLECTOR::Collect(), GERBER_COLLECTOR::Collect(), Collect(), GENERAL_COLLECTOR::Collect(), SCH_TYPE_COLLECTOR::Collect(), GENERAL_COLLECTOR::GENERAL_COLLECTOR(), GERBER_COLLECTOR::GERBER_COLLECTOR(), LIB_COLLECTOR::LIB_COLLECTOR(), SCH_COLLECTOR(), and SCH_FIND_COLLECTOR::SCH_FIND_COLLECTOR().

209  {
210  m_ScanTypes = scanTypes;
211  }
const KICAD_T * m_ScanTypes
Which object types to scan.
void COLLECTOR::SetTimeNow ( )
inlineinherited

Definition at line 213 of file class_collector.h.

References GetNewTimeStamp().

Referenced by GERBER_COLLECTOR::Collect(), and GENERAL_COLLECTOR::Collect().

214  {
216  }
time_t GetNewTimeStamp()
Definition: common.cpp:166
time_t m_TimeAtCollection
The time at which the collection was made.

Member Data Documentation

const KICAD_T SCH_COLLECTOR::AllItemsButPins
static
const KICAD_T SCH_COLLECTOR::CmpFieldFootprintOnly
static
Initial value:

A scan list for a specific editable field: Footprint.

Definition at line 68 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnEditItem().

const KICAD_T SCH_COLLECTOR::CmpFieldReferenceOnly
static
Initial value:

A scan list for a specific editable field: Reference.

Definition at line 63 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnEditItem().

const KICAD_T SCH_COLLECTOR::CmpFieldValueOnly
static
Initial value:

A scan list for a specific editable field: Value.

Definition at line 58 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnEditItem().

const KICAD_T SCH_COLLECTOR::ComponentsOnly
static
Initial value:

A scan list for schematic component items only.

Definition at line 98 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::LocateAndShowItem(), SCH_EDIT_FRAME::OnEditItem(), SCH_EDIT_FRAME::OnOpenLibraryEditor(), and SCH_SCREEN::UpdateSymbolLinks().

const KICAD_T SCH_COLLECTOR::CopyableItems
static
Initial value:

A scan list for schematic items that can be copied/duplicated.

Definition at line 118 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnHotKey().

const KICAD_T SCH_COLLECTOR::DraggableItems
static
Initial value:

A scan list for all draggable schematic items.

Definition at line 78 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnDragItem().

const KICAD_T SCH_COLLECTOR::EditableItems
static
Initial value:

A scan list for all editable schematic items.

Definition at line 53 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnEditItem().

EDA_RECT COLLECTOR::m_RefBox
protectedinherited

A bounding box to test against, and that was used to make the collection.

Definition at line 72 of file class_collector.h.

Referenced by COLLECTOR::GetBoundingBox().

wxPoint COLLECTOR::m_RefPos
protectedinherited

A point to test against, and that was used to make the collection.

Definition at line 69 of file class_collector.h.

Referenced by COLLECTOR::GetRefPos(), LIB_COLLECTOR::Inspect(), GERBER_COLLECTOR::Inspect(), Inspect(), GENERAL_COLLECTOR::Inspect(), and IsDraggableJunction().

const KICAD_T* COLLECTOR::m_ScanTypes
protectedinherited
time_t COLLECTOR::m_TimeAtCollection
protectedinherited

The time at which the collection was made.

Definition at line 75 of file class_collector.h.

Referenced by COLLECTOR::GetTime().

const KICAD_T SCH_COLLECTOR::OrientableItems
static
Initial value:

A scan list for schematic items that can be mirrored.

Definition at line 113 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnOrient().

const KICAD_T SCH_COLLECTOR::RotatableItems
static
Initial value:

A scan list for all rotatable schematic items.

Definition at line 83 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnRotate().

const KICAD_T SCH_COLLECTOR::SheetsAndSheetLabels
static
Initial value:

A scan list for schematic sheet and sheet label items.

Definition at line 108 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::OnLeftClick().

const KICAD_T SCH_COLLECTOR::SheetsOnly
static
Initial value:

A scan list for schematic sheet items only.

Definition at line 103 of file sch_collectors.h.

Referenced by SCH_EDIT_FRAME::AppendSchematic().


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