KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO::FIELD_LIST Class Reference

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_CHAINm_Chain
 

Detailed Description

A field list is a linked list of 0x03.

This class adds accessors for picking out specific fields by subtype/code

Definition at line 375 of file allegro_db.h.

Constructor & Destructor Documentation

◆ FIELD_LIST()

ALLEGRO::FIELD_LIST::FIELD_LIST ( DB_REF_CHAIN & aChain)
inline

Definition at line 378 of file allegro_db.h.

References m_Chain.

Member Function Documentation

◆ GetOptField()

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 691 of file allegro_db.cpp.

References ALLEGRO::DB_OBJ::GetType(), m_Chain, ALLEGRO::FIELD::m_FieldValue, and ALLEGRO::FIELD::m_Hdr1.

Referenced by ALLEGRO::BOARD_BUILDER::applyConstraintSets().

◆ GetOptFieldExpectInt()

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 635 of file allegro_db.cpp.

References ALLEGRO::DB_OBJ::GetType(), m_Chain, ALLEGRO::FIELD::m_FieldValue, ALLEGRO::FIELD::m_Hdr1, ALLEGRO::FIELD::m_SubType, and THROW_IO_ERROR.

◆ GetOptFieldExpectString()

const wxString * FIELD_LIST::GetOptFieldExpectString ( uint16_t aFieldCode) const

Member Data Documentation

◆ m_Chain

DB_REF_CHAIN& ALLEGRO::FIELD_LIST::m_Chain
private

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