|
KiCad PCB EDA Suite
|
Range-for-compatible walker over a linked list of BLOCK_BASE objects in a BRD_DB. More...
#include <allegro_db_utils.h>
Classes | |
| class | ITERATOR |
Public Types | |
| using | NEXT_FUNC_T = std::function<uint32_t( const BLOCK_BASE& )> |
Public Member Functions | |
| LL_WALKER (uint32_t aHead, uint32_t aTail, const BRD_DB &aBoard, NEXT_FUNC_T aNextFunc=GetPrimaryNext) | |
| General constructor for walking any linked list given head/tail keys, a database, and a next-function that returns the next key for a given block. | |
| LL_WALKER (const FILE_HEADER::LINKED_LIST &aList, const BRD_DB &aBoard, NEXT_FUNC_T aNextFunc=GetPrimaryNext) | |
| Convenience constructor for linked lists in the file header. | |
| ITERATOR | begin () const |
| ITERATOR | end () const |
Private Attributes | |
| uint32_t | m_head |
| uint32_t | m_tail |
| const BRD_DB & | m_board |
| NEXT_FUNC_T | m_nextFunction |
Range-for-compatible walker over a linked list of BLOCK_BASE objects in a BRD_DB.
By default, follows the primary linked-list pointer for each block type (via GetPrimaryNext). A custom next-function can be provided via SetNextFunc() for lists that use a different link field (e.g. m_NextInFp for pad lists).
Definition at line 144 of file allegro_db_utils.h.
| using ALLEGRO::LL_WALKER::NEXT_FUNC_T = std::function<uint32_t( const BLOCK_BASE& )> |
Definition at line 147 of file allegro_db_utils.h.
|
inline |
General constructor for walking any linked list given head/tail keys, a database, and a next-function that returns the next key for a given block.
| aHead | key of the first block in the list |
| aTail | key of the last block in the list (the list ends when the next key is this value) |
| aBoard | the database to look up blocks in |
| aNextFunc | function that takes some block and returns the key of the next block |
Definition at line 240 of file allegro_db_utils.h.
References ALLEGRO::GetPrimaryNext(), m_board, m_head, m_nextFunction, m_tail, and move.
Referenced by LL_WALKER().
|
inline |
Convenience constructor for linked lists in the file header.
Definition at line 252 of file allegro_db_utils.h.
References ALLEGRO::GetPrimaryNext(), LL_WALKER(), and move.
|
inline |
Definition at line 258 of file allegro_db_utils.h.
References m_board, m_head, m_nextFunction, and m_tail.
|
inline |
Definition at line 263 of file allegro_db_utils.h.
|
private |
Definition at line 271 of file allegro_db_utils.h.
Referenced by begin(), and LL_WALKER().
|
private |
Definition at line 269 of file allegro_db_utils.h.
Referenced by begin(), and LL_WALKER().
|
private |
Definition at line 272 of file allegro_db_utils.h.
Referenced by begin(), and LL_WALKER().
|
private |
Definition at line 270 of file allegro_db_utils.h.
Referenced by begin(), and LL_WALKER().