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 305 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 308 of file class_netinfo.h.

308  :
309  m_iterator( aIter ), m_mapping( aMapping )
310  {
311  }
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 334 of file class_netinfo.h.

References m_iterator.

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

Definition at line 245 of file class_netinfolist.cpp.

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

246 {
247  return m_mapping->m_board->FindNet( m_iterator->first );
248 }
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 314 of file class_netinfo.h.

References m_iterator.

315  {
316  ++m_iterator;
317 
318  return *this;
319  }
std::map< int, int >::const_iterator m_iterator
iterator NETINFO_MAPPING::iterator::operator++ ( int  )
inline

post-increment operator

Definition at line 322 of file class_netinfo.h.

References m_iterator.

323  {
324  iterator ret = *this;
325  ++m_iterator;
326 
327  return ret;
328  }
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 251 of file class_netinfolist.cpp.

252 {
253  return m_mapping->m_board->FindNet( m_iterator->first );
254 }
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 339 of file class_netinfo.h.

References m_iterator.

340  {
341  return m_iterator == aOther.m_iterator;
342  }
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 345 of file class_netinfo.h.

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

const NETINFO_MAPPING* NETINFO_MAPPING::iterator::m_mapping
private

Definition at line 346 of file class_netinfo.h.

Referenced by operator*().


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