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
 Operator [] overloads COLLECTOR::operator[](int) to return a SCH_ITEM* instead of an EDA_ITEM* type. 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(), Inspect(), GENERAL_COLLECTOR::Inspect(), SCH_FIND_COLLECTOR::Inspect(), SCH_TYPE_COLLECTOR::Inspect(), and PCB_TYPE_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 242 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().

244 {
245  Empty(); // empty the collection just in case
246 
247  SetScanTypes( aFilterList );
248 
249  // remember where the snapshot was taken from and pass refPos to the Inspect() function.
250  SetRefPos( aPosition );
251 
253 }
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(), Collect(), GENERAL_COLLECTOR::Collect(), SCH_TYPE_COLLECTOR::Collect(), PCB_TYPE_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 212 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.

213 {
214  if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
215  return SEARCH_CONTINUE;
216 
217  // Pins have special hit testing requirements that are relative to their parent
218  // SCH_COMPONENT item.
219  if( aItem->Type() == LIB_PIN_T )
220  {
221  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
222  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
223 
224  // Pin hit testing is relative to the components position and orientation in the
225  // schematic. The hit test position must be converted to library coordinates.
226  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
227  TRANSFORM transform = component->GetTransform().InverseTransform();
228  wxPoint position = transform.TransformCoordinate( m_RefPos - component->GetPosition() );
229 
230  position.y *= -1; // Y axis polarity in schematic is inverted from library.
231 
232  if( !aItem->HitTest( position ) )
233  return SEARCH_CONTINUE;
234  }
235 
236  Append( aItem );
237 
238  return SEARCH_CONTINUE;
239 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
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:288
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:151
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 256 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().

257 {
258  if( GetCount() != 2 )
259  return false;
260 
261  bool is_busentry0 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[0] ) != NULL);
262  bool is_busentry1 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[1] ) != NULL);
263 
264  if( (m_List[0]->Type() == SCH_LINE_T) && (m_List[1]->Type() == SCH_LINE_T) )
265  return true;
266 
267  if( (m_List[0]->Type() == SCH_LINE_T) && is_busentry1 )
268  return true;
269 
270  if( is_busentry0 && (m_List[1]->Type() == SCH_LINE_T) )
271  return true;
272 
273  return false;
274 }
int GetCount() const
Function GetCount returns the number of objects in the list.
Class SCH_BUS_ENTRY_BASE.
Definition: sch_bus_entry.h:43
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 311 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().

312 {
313  int wireEndCount = 0;
314  int wireMidPoint = 0;
315  int junctionCount = 0;
316 
317  for( size_t i = 0; i < m_List.size(); i++ )
318  {
319  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
320  KICAD_T type = item->Type();
321 
322  if( type == SCH_JUNCTION_T )
323  {
324  junctionCount++;
325  continue;
326  }
327 
328  if( type == SCH_LINE_T )
329  {
330  if( item->GetLayer() != LAYER_WIRE )
331  return false;
332 
333  SCH_LINE* line = (SCH_LINE*) item;
334 
335  if( line->IsEndPoint( m_RefPos ) )
336  wireEndCount++;
337  else
338  wireMidPoint++;
339 
340  continue;
341  }
342 
343  // Any other item types indicate that this collection is not a draggable junction.
344  return false;
345  }
346 
347  return (wireEndCount >= 3) || ((wireEndCount >= 1) && (wireMidPoint == 1))
348  || ((wireMidPoint >= 2) && (junctionCount == 1));
349 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
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:90
bool IsEndPoint(const wxPoint &aPoint) const
Definition: sch_line.h:64
Class SCH_LINE is a segment description base class to describe items which have 2 end points (track...
Definition: sch_line.h:42
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 277 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().

278 {
279  for( size_t i = 0; i < m_List.size(); i++ )
280  {
281  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
282  KICAD_T type = item->Type();
283 
284  if( type == SCH_JUNCTION_T )
285  continue;
286 
287  if( type == SCH_LINE_T )
288  {
289  if( item->GetLayer() != LAYER_WIRE )
290  return false;
291 
292  continue;
293  }
294 
295  if( type == LIB_PIN_T )
296  {
297  if( !aIncludePins )
298  return false;
299 
300  continue;
301  }
302 
303  // Any other item types indicate that this collection is not a node.
304  return false;
305  }
306 
307  return true;
308 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
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:90
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

Operator [] overloads COLLECTOR::operator[](int) to return a SCH_ITEM* instead of an EDA_ITEM* type.

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

Definition at line 135 of file sch_collectors.h.

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

136  {
137  if( (unsigned)aIndex < (unsigned)GetCount() )
138  return (SCH_ITEM*) m_List[ aIndex ];
139 
140  return NULL;
141  }
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(), 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(), 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(), Collect(), GENERAL_COLLECTOR::Collect(), SCH_TYPE_COLLECTOR::Collect(), GENERAL_COLLECTOR::GENERAL_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 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_SCREEN::CheckComponentsToPartsLinks(), SCH_EDIT_FRAME::LocateAndShowItem(), SCH_EDIT_FRAME::OnEditItem(), and SCH_EDIT_FRAME::OnOpenLibraryEditor().

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().

INSPECTOR_FUNC COLLECTOR::m_inspector
protectedinherited
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(), 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.


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