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 316 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 319 of file class_netinfo.h.

319  :
320  m_iterator( aIter ), m_mapping( aMapping )
321  {
322  }
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 345 of file class_netinfo.h.

References m_iterator.

346  {
347  return m_iterator != aOther.m_iterator;
348  }
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 325 of file class_netinfo.h.

References m_iterator.

326  {
327  ++m_iterator;
328 
329  return *this;
330  }
std::map< int, int >::const_iterator m_iterator
iterator NETINFO_MAPPING::iterator::operator++ ( int  )
inline

post-increment operator

Definition at line 333 of file class_netinfo.h.

References m_iterator.

334  {
335  iterator ret = *this;
336  ++m_iterator;
337 
338  return ret;
339  }
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 350 of file class_netinfo.h.

References m_iterator.

351  {
352  return m_iterator == aOther.m_iterator;
353  }
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 356 of file class_netinfo.h.

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

const NETINFO_MAPPING* NETINFO_MAPPING::iterator::m_mapping
private

Definition at line 357 of file class_netinfo.h.

Referenced by operator*().


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