|
KiCad PCB EDA Suite
|
A field list is a linked list of 0x03. More...
#include <allegro_db.h>
Public Member Functions | |
| FIELD_LIST (DB_REF_CHAIN &aChain) | |
| std::optional< int > | GetOptFieldExpectInt (uint16_t aFieldCode) const |
| Get the integer value of the field with the given code, if in the list. | |
| const wxString * | GetOptFieldExpectString (uint16_t aFieldCode) const |
| std::optional< std::variant< wxString, uint32_t > > | GetOptField (uint16_t aFieldCode) const |
| Get the raw variant value of the field with the given code, if present. | |
Private Attributes | |
| DB_REF_CHAIN & | m_Chain |
A field list is a linked list of 0x03.
This class adds accessors for picking out specific fields by subtype/code
Definition at line 434 of file allegro_db.h.
|
inline |
Definition at line 437 of file allegro_db.h.
References m_Chain.
| std::optional< std::variant< wxString, uint32_t > > FIELD_LIST::GetOptField | ( | uint16_t | aFieldCode | ) | const |
Get the raw variant value of the field with the given code, if present.
Returns nullopt if the field is not in the list.
Definition at line 725 of file allegro_db.cpp.
References ALLEGRO::BRD_FIELD, ALLEGRO::DB_OBJ::GetType(), m_Chain, ALLEGRO::FIELD::m_FieldValue, and ALLEGRO::FIELD::m_Hdr1.
Referenced by ALLEGRO::BOARD_BUILDER::applyConstraintSets().
| std::optional< int > FIELD_LIST::GetOptFieldExpectInt | ( | uint16_t | aFieldCode | ) | const |
Get the integer value of the field with the given code, if in the list.
If found, it is expected to be an integer field.
Definition at line 669 of file allegro_db.cpp.
References ALLEGRO::BRD_FIELD, ALLEGRO::DB_OBJ::GetType(), m_Chain, ALLEGRO::FIELD::m_FieldValue, ALLEGRO::FIELD::m_Hdr1, ALLEGRO::FIELD::m_SubType, and THROW_IO_ERROR.
| const wxString * FIELD_LIST::GetOptFieldExpectString | ( | uint16_t | aFieldCode | ) | const |
Definition at line 697 of file allegro_db.cpp.
References ALLEGRO::BRD_FIELD, ALLEGRO::DB_OBJ::GetType(), m_Chain, ALLEGRO::FIELD::m_FieldValue, ALLEGRO::FIELD::m_Hdr1, ALLEGRO::FIELD::m_SubType, and THROW_IO_ERROR.
|
private |
Definition at line 458 of file allegro_db.h.
Referenced by FIELD_LIST(), GetOptField(), GetOptFieldExpectInt(), and GetOptFieldExpectString().