KiCad PCB EDA Suite
NETINFO_MAPPING::iterator Class Reference

Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*>

More...

#include <class_netinfo.h>

Public Member Functions

 iterator (std::map< int, int >::const_iterator aIter, const NETINFO_MAPPING *aMapping)
 
const iteratoroperator++ ()
 pre-increment operator More...
 
iterator operator++ (int)
 post-increment operator More...
 
NETINFO_ITEMoperator* () const
 
NETINFO_ITEMoperator-> () const
 
bool operator!= (const iterator &aOther) const
 
bool operator== (const iterator &aOther) const
 

Private Attributes

std::map< int, int >::const_iterator m_iterator
 
const NETINFO_MAPPINGm_mapping
 

Detailed Description

Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*>

Definition at line 396 of file class_netinfo.h.

Constructor & Destructor Documentation

NETINFO_MAPPING::iterator::iterator ( std::map< int, int >::const_iterator  aIter,
const NETINFO_MAPPING aMapping 
)
inline

Definition at line 399 of file class_netinfo.h.

399  :
400  m_iterator( aIter ), m_mapping( aMapping )
401  {
402  }
const NETINFO_MAPPING * m_mapping
std::map< int, int >::const_iterator m_iterator

Member Function Documentation

bool NETINFO_MAPPING::iterator::operator!= ( const iterator aOther) const
inline

Definition at line 425 of file class_netinfo.h.

References m_iterator.

426  {
427  return m_iterator != aOther.m_iterator;
428  }
std::map< int, int >::const_iterator m_iterator
NETINFO_ITEM * NETINFO_MAPPING::iterator::operator* ( ) const

Definition at line 361 of file class_netinfolist.cpp.

References BOARD::FindNet(), NETINFO_MAPPING::m_board, m_iterator, and m_mapping.

362 {
363  return m_mapping->m_board->FindNet( m_iterator->first );
364 }
const BOARD * m_board
Board for which mapping is prepared
const NETINFO_MAPPING * m_mapping
std::map< int, int >::const_iterator m_iterator
NETINFO_ITEM * FindNet(int aNetcode) const
Function FindNet searches for a net with the given netcode.
const iterator& NETINFO_MAPPING::iterator::operator++ ( )
inline

pre-increment operator

Definition at line 405 of file class_netinfo.h.

References m_iterator.

406  {
407  ++m_iterator;
408 
409  return *this;
410  }
std::map< int, int >::const_iterator m_iterator
iterator NETINFO_MAPPING::iterator::operator++ ( int  )
inline

post-increment operator

Definition at line 413 of file class_netinfo.h.

References m_iterator.

414  {
415  iterator ret = *this;
416  ++m_iterator;
417 
418  return ret;
419  }
iterator(std::map< int, int >::const_iterator aIter, const NETINFO_MAPPING *aMapping)
std::map< int, int >::const_iterator m_iterator
NETINFO_ITEM * NETINFO_MAPPING::iterator::operator-> ( ) const

Definition at line 367 of file class_netinfolist.cpp.

368 {
369  return m_mapping->m_board->FindNet( m_iterator->first );
370 }
const BOARD * m_board
Board for which mapping is prepared
const NETINFO_MAPPING * m_mapping
std::map< int, int >::const_iterator m_iterator
NETINFO_ITEM * FindNet(int aNetcode) const
Function FindNet searches for a net with the given netcode.
bool NETINFO_MAPPING::iterator::operator== ( const iterator aOther) const
inline

Definition at line 430 of file class_netinfo.h.

References m_iterator.

431  {
432  return m_iterator == aOther.m_iterator;
433  }
std::map< int, int >::const_iterator m_iterator

Member Data Documentation

std::map<int, int>::const_iterator NETINFO_MAPPING::iterator::m_iterator
private

Definition at line 436 of file class_netinfo.h.

Referenced by operator!=(), operator*(), operator++(), and operator==().

const NETINFO_MAPPING* NETINFO_MAPPING::iterator::m_mapping
private

Definition at line 437 of file class_netinfo.h.

Referenced by operator*().


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