KiCad PCB EDA Suite
|
#include <netinfo.h>
Classes | |
class | iterator |
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*> More... | |
Public Member Functions | |
NETINFO_MAPPING () | |
void | SetBoard (const BOARD *aBoard) |
Set a BOARD object that is used to prepare the net code map. | |
void | Update () |
Prepare a mapping for net codes so they can be saved as consecutive numbers. | |
int | Translate (int aNetCode) const |
Translate net number according to the map prepared by Update() function. | |
iterator | begin () const |
Return iterator to the first entry in the mapping. | |
iterator | end () const |
Return iterator to the last entry in the mapping. | |
int | GetSize () const |
Private Attributes | |
const BOARD * | m_board |
Board for which mapping is prepared. | |
std::map< int, int > | m_netMapping |
Map that allows saving net codes with consecutive numbers (for compatibility reasons) | |
|
inline |
Definition at line 198 of file netinfo.h.
References m_board.
Referenced by NETINFO_MAPPING::iterator::iterator().
|
inline |
Return iterator to the first entry in the mapping.
Definition at line 282 of file netinfo.h.
References m_netMapping.
|
inline |
Return iterator to the last entry in the mapping.
Definition at line 293 of file netinfo.h.
References m_netMapping.
|
inline |
Definition at line 301 of file netinfo.h.
References m_netMapping.
|
inline |
int NETINFO_MAPPING::Translate | ( | int | aNetCode | ) | const |
Translate net number according to the map prepared by Update() function.
It allows one to have items stored with consecutive net codes.
aNetCode | is an old net code. |
Definition at line 278 of file netinfo_list.cpp.
References m_netMapping.
void NETINFO_MAPPING::Update | ( | ) |
Prepare a mapping for net codes so they can be saved as consecutive numbers.
To retrieve a mapped net code, use translateNet() function after calling this.
Definition at line 290 of file netinfo_list.cpp.
References BOARD_CONNECTED_ITEM::GetNetCode(), m_board, m_netMapping, pad, and PCB_SHAPE_T.
Referenced by SetBoard().
|
private |
Board for which mapping is prepared.
Definition at line 307 of file netinfo.h.
Referenced by NETINFO_MAPPING(), SetBoard(), and Update().
|
private |