35#define BLK_DATA( BLK, T ) static_cast<const BLOCK<T>&>( BLK ).GetData()
103 std::optional<uint32_t> key =
GetBlockKey( *
this );
104 return key.value_or( 0 );
127 wxLogTrace(
"ALLEGRO_EXTRACT",
"Failed to resolve DB_REF target key %#010x for %s",
170 while( n !=
nullptr )
181 n = aResolver.
Resolve( nextKey );
185 wxLogTrace(
"ALLEGRO_EXTRACT",
"Failed to resolve DB_REF_CHAIN up to tail %#010x for %s",
m_Tail,
m_DebugName ?
m_DebugName :
"<unknown>" );
219 bool skipDbObj =
false;
226 uint8_t t = aBlock->GetBlockType();
227 skipDbObj = ( t == 0x01 || t == 0x14 || t == 0x15 || t == 0x16 || t == 0x17 );
232 std::unique_ptr<DB_OBJ> dbObj =
m_ObjFactory.CreateObject( *aBlock );
238 if( aBlock->GetKey() != 0 )
241 m_Blocks.push_back( std::move( aBlock ) );
246 std::unique_ptr<DB_OBJ> obj;
253 obj = std::make_unique<ARC>( arcBlk );
259 obj = std::make_unique<FIELD>( blk03 );
265 obj = std::make_unique<NET_ASSIGN>(
m_brdDb, netBlk );
271 obj = std::make_unique<TRACK>(
m_brdDb, trackBlk );
277 obj = std::make_unique<COMPONENT>(
m_brdDb, compBlk );
283 obj = std::make_unique<COMPONENT_INST>( strBlk );
289 obj = std::make_unique<PIN_NUMBER>( symbolBlk );
295 obj = std::make_unique<SHAPE_SEG_OBJ>(
m_brdDb, pinBlk );
301 obj = std::make_unique<FUNCTION_SLOT>( funcSlotBlk );
307 obj = std::make_unique<FUNCTION_INSTANCE>( funcInstBlk );
313 obj = std::make_unique<PIN_NAME>( pinNameBlk );
319 obj = std::make_unique<XREF_OBJ>( blk );
325 obj = std::make_unique<GRAPHIC_SEG>(
m_brdDb, lineBlk );
333 obj = std::make_unique<LINE>( seg );
339 obj = std::make_unique<NET>(
m_brdDb, netBlk );
345 obj = std::make_unique<UNKNOWN_0x20>(
m_brdDb, blk );
351 obj = std::make_unique<SHAPE>(
m_brdDb, shapeBlk );
357 obj = std::make_unique<FOOTPRINT_DEF>(
m_brdDb, fpBlk );
363 obj = std::make_unique<FOOTPRINT_INSTANCE>( fpInstBlk );
369 obj = std::make_unique<CONNECTION_OBJ>(
m_brdDb, padBlk );
375 obj = std::make_unique<PLACED_PAD>(
m_brdDb, placedPadBlk );
381 obj = std::make_unique<VIA>(
m_brdDb, viaBlk );
409 m_Objects[aObject->GetKey()] = std::move( aObject );
418 return it->second.get();
440 obj->m_Valid = obj->ResolveRefs( *
this );
446 THROW_IO_ERROR( wxString::Format(
"Failed to resolve references for object key %#010x", key ) );
455 obj->m_Valid = obj->ResolveRefs( *
this );
460 std::function<
const DB_REF&(
const DB_OBJ& aObj )> aVisitor )
const
463 uint32_t lastKey = aLList.
m_Head;
465 size_t iterations = 0;
469 const DB_REF& nextRef = aVisitor( *node );
477 if( iterations++ >= 1e6 )
494 return objType == aType;
503 return std::find( aTypes.begin(), aTypes.end(), objType ) != aTypes.end();
521 m_Parent.m_DebugName =
"ARC::m_Parent";
539 m_Next.m_DebugName =
"NET_ASSIGN::m_Next";
542 m_Net.m_DebugName =
"NET_ASSIGN::m_Net";
545 m_ConnItem.m_DebugName =
"NET_ASSIGN::m_ConnItem";
553 ok &=
m_Next.Resolve( aResolver );
554 ok &=
m_Net.Resolve( aResolver );
565 if(
m_Net.m_Target ==
nullptr )
567 THROW_IO_ERROR( wxString::Format(
"NET_ASSIGN::GetNet: NET reference is null for key %#010x",
m_Key ) );
570 return static_cast<const NET&
>( *
m_Net.m_Target );
579 m_Next.m_DebugName =
"TRACK::m_Next";
587 ok &=
m_Next.Resolve( aResolver );
601 m_Next.m_DebugName =
"FIELD::m_Next";
607 m_FieldValue = wxString(std::get<std::string>( aBlk.m_Substruct ) );
612 m_FieldValue = std::get<uint32_t>( aBlk.m_Substruct );
625 catch(
const std::bad_variant_access& )
627 THROW_IO_ERROR(
"FIELD::ExpectString: Field value is not a string" );
641 if( !obj || obj->
GetType() != DB_OBJ::TYPE::FIELD)
644 const FIELD& field =
static_cast<const FIELD&
>( *obj );
645 if( field.
m_Hdr1 == aFieldCode )
651 catch(
const std::bad_variant_access& )
653 THROW_IO_ERROR( wxString::Format(
"FIELD code %#04x is not an integer (subtype: %#04x )", aFieldCode,
669 if( !obj || obj->
GetType() != DB_OBJ::TYPE::FIELD)
672 const FIELD& field =
static_cast<const FIELD&
>( *obj );
673 if( field.
m_Hdr1 == aFieldCode )
679 catch(
const std::bad_variant_access& )
681 THROW_IO_ERROR( wxString::Format(
"FIELD code %#04x is not a string (subtype: %#04x )", aFieldCode,
695 if( !obj || obj->
GetType() != DB_OBJ::TYPE::FIELD )
698 const FIELD& field =
static_cast<const FIELD&
>( *obj );
700 if( field.
m_Hdr1 == aFieldCode )
713 m_Next.m_DebugName =
"COMPONENT::m_Next";
728 m_Instances.m_DebugName =
"COMPONENT::m_Instances";
737 m_Fields.m_DebugName =
"COMPONENT::m_Fields";
745 ok &=
m_Next.Resolve( aResolver );
751 ok &=
m_Fields.Resolve( aResolver );
769 m_TextStr.m_DebugName =
"COMPONENT_INST::m_TextStr";
771 m_Next.m_DebugName =
"COMPONENT_INST::m_Next";
778 m_Pads.m_NextKeyGetter = [](
const DB_OBJ& aObj ) -> uint32_t
781 return pad.m_NextInCompInst.m_TargetKey;
783 m_Pads.m_DebugName =
"COMPONENT_INST::m_Pads";
792 ok &=
m_Next.Resolve( aResolver );
794 ok &=
m_Pads.Resolve( aResolver );
810 THROW_IO_ERROR(
"COMPONENT_INST::GetFunctionInstance: Null reference to FUNCTION_INSTANCE" );
819 if(
m_Next.m_Target ==
nullptr )
821 wxLogTrace(
"ALLEGRO_EXTRACT",
"COMPONENT_INST::GetNextInstance: Null m_Next reference for key %#010x",
m_Key );
826 if(
m_Next.m_Target->GetType() != DB_OBJ::TYPE::COMPONENT_INST )
839 m_PinName.m_DebugName =
"PIN_NUMBER::m_PinName";
842 m_Next.m_DebugName =
"PIN_NUMBER::m_Next";
858 ok &=
m_Next.Resolve( aResolver );
890 m_Next.m_DebugName =
"SHAPE_SEG_OBJ::m_Next";
898 ok &=
m_Next.Resolve( aResolver );
911 m_Next.m_DebugName =
"PIN_NAME::m_Next";
922 ok &=
m_Next.Resolve( aResolver );
952 m_Ptr1.m_DebugName =
"XREF_OBJ::m_Ptr1";
955 m_Ptr2.m_DebugName =
"XREF_OBJ::m_Ptr2";
958 m_Ptr3.m_DebugName =
"XREF_OBJ::m_Ptr3";
965 m_Ptr1.Resolve( aResolver );
966 m_Ptr2.Resolve( aResolver );
967 m_Ptr3.Resolve( aResolver );
978 m_Parent.m_DebugName =
"GRAPHIC_SEG::m_Parent";
982 m_Next.m_DebugName =
"GRAPHIC_SEG::m_Next";
985 m_Segment.m_DebugName =
"GRAPHIC_SEG::m_Segment";
993 ok &=
m_Parent.Resolve( aResolver );
994 ok &=
m_Next.Resolve( aResolver );
1012 m_Parent.m_DebugName =
"SEGMENT::m_Parent";
1015 m_Next.m_DebugName =
"SEGMENT::m_Next";
1030 m_Next.Resolve( aResolver );
1047 if (aObj.GetType() != DB_OBJ::TYPE::FP_INST )
1056 m_SymLibPath.m_DebugName =
"FOOTPRINT_DEF::m_SymLibPath";
1064 ok &=
m_Next.Resolve( aResolver );
1065 ok &=
m_FpStr.Resolve( aResolver );
1077 wxLogTrace(
"ALLEGRO_EXTRACT",
"Resolved %zu footprint instances for footprint def key %#010x",
m_Instances.m_Chain.size(),
GetKey() );
1110 if (aObj.GetType() != DB_OBJ::TYPE::PLACED_PAD )
1112 wxLogTrace(
"ALLEGRO_EXTRACT",
"FOOTPRINT_INSTANCE::m_Pads: Unexpected type in pad chain: %d", static_cast<int>( aObj.GetType() ) );
1116 return static_cast<const PLACED_PAD&
>( aObj ).m_NextInFp.m_TargetKey;
1122 m_X = aBlk.m_CoordX;
1123 m_Y = aBlk.m_CoordY;
1124 m_Rotation = aBlk.m_Rotation;
1125 m_Mirrored = ( aBlk.m_Layer != 0 );
1133 ok &=
m_Next.Resolve( aResolver );
1135 ok &=
m_Pads.Resolve( aResolver );
1151 return componentInstance;
1169 m_SlotName.m_DebugName =
"FUNCTION_SLOT::m_SlotName";
1174 m_Component.m_DebugName =
"FUNCTION_SLOT::m_Component";
1177 m_PinName.m_DebugName =
"FUNCTION_SLOT::m_PinName";
1206 m_Slot.m_DebugName =
"FUNCTION_INSTANCE::m_Slots";
1209 m_Fields.m_DebugName =
"FUNCTION_INSTANCE::m_Fields";
1212 m_FunctionName.m_DebugName =
"FUNCTION_INSTANCE::m_FunctionName";
1223 ok &=
m_Slot.Resolve( aResolver );
1224 ok &=
m_Fields.Resolve( aResolver );
1243 "FUNCTION_INSTANCE::GetComponentInstance: Null reference to COMPONENT_INST" );
1252 if(
m_Slot.m_Target ==
nullptr )
1254 THROW_IO_ERROR(
"FUNCTION_INSTANCE::GetFunctionSlot: Null reference to FUNCTION_SLOT" );
1268 m_Next.m_DebugName =
"NET::m_Next";
1286 if( aObj.GetType() != DB_OBJ::TYPE::FIELD )
1289 const FIELD& field =
static_cast<const FIELD&
>( aObj );
1302 ok &=
m_Next.Resolve( aResolver );
1356 m_Next.m_DebugName =
"UNKNOWN_0x20::m_Next";
1363 m_Next.Resolve( aResolver );
1374 m_Next.m_DebugName =
"SHAPE::m_Next";
1377 m_Segments.m_DebugName =
"SHAPE::m_Segments";
1387 m_Next.Resolve( aResolver );
1400 m_Next.m_DebugName =
"CONNECTION_OBJ::m_Next";
1403 m_NetAssign.m_DebugName =
"CONNECTION_OBJ::m_NetAssign";
1406 m_Connection.m_DebugName =
"CONNECTION_OBJ::m_Connection";
1417 ok &=
m_Next.Resolve( aResolver );
1432 m_Next.m_DebugName =
"PLACED_PAD::m_Next";
1435 m_NextInFp.m_DebugName =
"PLACED_PAD::m_NextInFp";
1444 m_PinNumber.m_DebugName =
"PLACED_PAD::m_PinNumber";
1450 m_NetAssign.m_DebugName =
"PLACED_PAD::m_NetAssign";
1463 ok &=
m_Next.Resolve( aResolver );
1494 if( pinName ==
nullptr )
1508 return &netAssign->
GetNet();
1517 m_Next.m_DebugName =
"VIA::m_Next";
1525 ok &=
m_Next.Resolve( aResolver );
1604 wxLogTrace(
"ALLEGRO_EXTRACT",
1605 "Strict reference resolution failed (%s), retrying with best-effort",
1617 const auto fpDefNextFunc = [&](
const DB_OBJ& aObj ) ->
const DB_REF&
1619 if( aObj.GetType() != DB_OBJ::TYPE::FP_DEF )
1635 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting footprint instances for footprint def key %#010x", aFpDef.
GetKey() );
1640 const auto fpInstNextFunc = [&](
const DB_OBJ& aObj )
1642 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting footprint instance key %#010x", aObj.GetKey() );
1643 if( aObj.GetType() != DB_OBJ::TYPE::FP_INST )
1645 wxLogTrace(
"ALLEGRO_EXTRACT",
" Not a footprint instance, skipping key %#010x", aObj.GetKey() );
1655 if( componentInstance )
1661 aVisitor( viewObjs );
1670 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting footprint instances" );
1686 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting function instances" );
1688 const auto componentVisitor = [&](
const VIEW_OBJS& aViewObjs )
1690 aVisitor( aViewObjs );
1700 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting components" );
1706 const auto x06NextFunc = [&](
const DB_OBJ& aObj ) ->
const DB_REF&
1708 if( aObj.GetType() != DB_OBJ::TYPE::COMPONENT )
1710 wxLogTrace(
"ALLEGRO_EXTRACT",
" Not a component object, skipping key %#010x", aObj.GetKey() );
1718 const auto compInstVisitor = [&](
const DB_OBJ& aObj )
1720 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting component instance key %#010x", aObj.GetKey() );
1722 if( aObj.GetType() != DB_OBJ::TYPE::COMPONENT_INST )
1724 wxLogTrace(
"ALLEGRO_EXTRACT",
" Not a component instance, skipping key %#010x", aObj.GetKey() );
1734 aVisitor( viewObjs );
1748 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting component pins" );
1750 const auto componentVisitor = [&](
const VIEW_OBJS& aViewObjs )
1755 if( compInst ==
nullptr )
1757 wxLogTrace(
"ALLEGRO_EXTRACT",
" No component instance in view objs, skipping" );
1761 const auto padVisitor = [&](
const DB_OBJ& aObj )
1763 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting pad key %#010x", aObj.GetKey() );
1764 if( aObj.GetType() != DB_OBJ::TYPE::PLACED_PAD )
1766 wxLogTrace(
"ALLEGRO_EXTRACT",
" Not a placed pad, skipping key %#010x, type", aObj.GetKey() );
1773 viewObj.
m_Pad = &placedPad;
1776 aVisitor( viewObj );
1788 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting nets" );
1793 const auto netNextFunc = [&](
const DB_OBJ& aObj ) ->
const DB_REF&
1795 if( aObj.GetType() != DB_OBJ::TYPE::NET )
1797 wxLogTrace(
"ALLEGRO_EXTRACT",
" Not a net object, skipping key %#010x", aObj.GetKey() );
1801 const NET& net =
static_cast<const NET&
>( aObj );
1803 viewObjs.
m_Net = &net;
1805 aVisitor( viewObjs );
1816 wxLogTrace(
"ALLEGRO_EXTRACT",
"Visiting connected geometry" );
1821 const auto netVisitor = [&](
const VIEW_OBJS& aViewObjs )
1823 const NET& net = *aViewObjs.m_Net;
static bool CheckTypeIsOneOf(const DB_REF &aRef, const std::vector< DB_OBJ::TYPE > &aTypes, bool aCanBeNull)
static void collectSentinelKeys(const FILE_HEADER &aHeader, DB &aDb)
static bool CheckTypeIs(const DB_REF &aRef, DB_OBJ::TYPE aType, bool aCanBeNull)
static std::optional< uint32_t > GetBlockKey(const BLOCK_BASE &block)
The base class for all blocks in the main body of an Allegro file.
uint8_t GetBlockType() const
std::unique_ptr< DB_OBJ > CreateObject(const BLOCK_BASE &aBlock) const
An Allegro database that represents a .brd file (amd presumably .dra)
void VisitConnectedGeometry(VIEW_OBJS_VISITOR aVisitor) const
std::unordered_map< uint32_t, BLOCK_BASE * > m_ObjectKeyMap
std::unique_ptr< FILE_HEADER > m_Header
std::vector< std::unique_ptr< BLOCK_BASE > > m_Blocks
void visitFootprintInstances(const FOOTPRINT_DEF &aFpDef, VIEW_OBJS_VISITOR aVisitor) const
void VisitNets(VIEW_OBJS_VISITOR aVisitor) const
void VisitFunctionInstances(VIEW_OBJS_VISITOR aVisitor) const
Access the function instances in the database.
std::function< void(const FOOTPRINT_DEF &aFpDef)> FP_DEF_VISITOR
void VisitFootprintDefs(FP_DEF_VISITOR aFpDef) const
Access the footprint defs in the database.
void ReserveCapacity(size_t aObjectCount, size_t aStringCount)
Pre-allocate storage for the expected number of objects and strings.
bool ResolveAndValidate()
Iterate all the links we know about and fill in the object links.
void VisitComponents(VIEW_OBJS_VISITOR aVisitor) const
void VisitFootprintInstances(VIEW_OBJS_VISITOR aVisitor) const
Access the footprint instances in the database.
void InsertBlock(std::unique_ptr< BLOCK_BASE > aBlock) override
void VisitComponentPins(VIEW_OBJS_VISITOR aVisitor) const
Visit all component pins in the database.
Some interface that can yield DB_OBJs for keys.
virtual DB_OBJ * Resolve(uint32_t aKey) const =0
Resolve the given reference.
virtual bool IsSentinel(uint32_t aKey) const
In v18+ files, linked list sentinel nodes are real blocks with small keys.
virtual const wxString * ResolveString(uint32_t aKey) const =0
An ALLEGRO::DB is the represention of the actual data stored within an Allegro file,...
const wxString * ResolveString(uint32_t aRef) const override
std::unordered_map< uint32_t, wxString > m_StringTable
void AddObject(std::unique_ptr< DB_OBJ > aObject)
void ResolveObjectLinksBestEffort()
Resolve all DB_OBJ references without throwing on failure.
std::unordered_map< uint32_t, std::unique_ptr< DB_OBJ > > m_Objects
void AddSentinelKey(uint32_t aKey)
void visitLinkedList(const FILE_HEADER::LINKED_LIST aLList, std::function< const DB_REF &(const DB_OBJ &aObj)> aVisitor) const
bool IsSentinel(uint32_t aKey) const override
In v18+ files, linked list sentinel nodes are real blocks with small keys.
void ResolveObjectLinks()
Iterate the database and resolve links.
DB_OBJ * Resolve(uint32_t aRef) const override
Implement the object resolver interface.
void reserveObjects(size_t aCount)
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.
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
SHAPE(const BRD_DB &aBrd, const BLK_0x28_SHAPE &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
UNKNOWN_0x20(const BRD_DB &aBrd, const BLK_0x20_UNKNOWN &aBlk)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString Problem() const
what was the problem?
#define THROW_IO_ERROR(msg)
macro which captures the "call site" values of FILE_, __FUNCTION & LINE
std::function< void(const VIEW_OBJS &aViewObjs)> VIEW_OBJS_VISITOR
static constexpr DB_REF DB_NULLREF
FMT_VER
The format of an Allego file.
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
ARC(const BLK_0x01_ARC &aBlk)
Arc segment used in tracks, zone outlines, and shape boundaries.
Field/property references with variable-typed substructs.
Net assignment linking a net (0x1B) to its member objects.
Component/symbol definitions.
uint32_t m_CompDeviceType
uint32_t m_PtrFunctionSlot
Component instance reference data.
uint32_t m_FunctionInstPtr
Pin number within a component.
COND_LT< FMT_VER::V_172, uint32_t > m_StrPtr16x
COND_GE< FMT_VER::V_172, uint32_t > m_StrPtr
Pointer to 0x11 PIN_NAME object.
Shape/fill segment linking a copper shape to its parent footprint.
Function slot in a multi-slot component (e.g.
std::array< char, 32 > m_CompDeviceType
Function instance linking a component instance (0x07) to its schematic function, pin cross-references...
uint32_t m_ComponentInstPtr
Pin name within a component, linked from function slots (0x0F).
uint32_t m_PinNameStrPtr
Pointer to next 0x11 PIN_NAME object or 0x0F SLOT.
uint32_t m_Next
Pointer to 0x08 PIN_NUMBER object.
Cross-reference between objects.
Graphics container holding a chain of line segments and arcs.
0x15 , 0x16, 0x17 are segments:
Polygon shape defined by a linked list of segments starting at m_FirstSegmentPtr (0x15/0x16/0x17 line...
uint32_t m_FirstSegmentPtr
Connection point at a track junction or pad-to-track transition.
Placed pad instance linking a pad definition (0x0D via m_PadPtr) to its parent footprint (m_ParentFp)...
uint32_t m_NextInCompInst
std::array< int32_t, 4 > m_Coords
Via instance with board position, padstack reference (m_Padstack for drill/annular ring definitions),...
COMPONENT_INST 0x07 objects.
const wxString * GetRefDesStr() const
const COMPONENT_INST * GetNextInstance() const
COMPONENT_INST(const BLK_0x07_COMPONENT_INST &aBlk)
const COMPONENT * GetParentComponent() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
const FUNCTION_INSTANCE & GetFunctionInstance() const
const wxString * GetComponentDeviceType() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
DB_STR_REF m_CompDeviceType
COMPONENT(const BRD_DB &aBrd, const BLK_0x06_COMPONENT &aBlk)
const T & value_or(const T &aDefault) const
CONNECTION_OBJ(const BRD_DB &aBrd, const BLK_0x2E_CONNECTION &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
A DB_OBJ represents one object in an Allegro database.
DB_OBJ(TYPE aType, uint32_t aKey)
std::vector< DB_OBJ * > m_Chain
void Visit(std::function< void(const DB_OBJ &aObj)> aVisitor) const
Visit all objects in the chain.
std::function< uint32_t(const DB_OBJ &)> m_NextKeyGetter
bool Resolve(const DB_OBJ_RESOLVER &aResolver) override
bool Resolve(const DB_OBJ_RESOLVER &aResolver) override
const wxString * m_String
bool Resolve(const DB_OBJ_RESOLVER &aResolver) override
const wxString & ExpectString() const
std::variant< wxString, uint32_t > m_FieldValue
FIELD(const BLK_0x03_FIELD &aBlk)
A FUNCTION (0x10) object represents a logical function, which is an instance of a single function slo...
const FUNCTION_SLOT & GetFunctionSlot() const
const COMPONENT_INST & GetComponentInstance() const
FUNCTION_INSTANCE(const BLK_0x10_FUNCTION_INST &aBlk)
const wxString * GetName() const
DB_REF m_ComponentInstance
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
DB_STR_REF m_FunctionName
FUNCTION_SLOT(const BLK_0x0F_FUNCTION_SLOT &aBlk)
const wxString * GetName() const
wxString m_CompDeviceType
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
GRAPHIC_SEG(const BRD_DB &aBrd, const BLK_0x14_GRAPHIC &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
LINE(const BLK_0x15_16_17_SEGMENT &aBlk)
const NET & GetNet() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
DB_REF m_Next
Reference to an 0x1B NET object.
NET_ASSIGN(const BRD_DB &aBrd, const BLK_0x04_NET_ASSIGNMENT &aBlk)
DB_REF m_Net
Reference to an 0x05 TRACK or 0x32 PLACED_PAD object.
const wxString * GetLogicalPath() const
std::optional< int > GetNetMaxNeckLength() const
NET(const BRD_DB &aBrd, const BLK_0x1B_NET &aBlk)
std::optional< int > GetNetMinLineWidth() const
std::optional< int > GetNetMaxLineWidth() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
const wxString * GetName() const
DB_REF_CHAIN m_FieldsChain
DB_REF_CHAIN m_NetAssignments
std::optional< int > GetNetMinNeckWidth() const
const PIN_NUMBER * GetPinNumber() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
PIN_NAME(const BLK_0x11_PIN_NAME &aBlk)
const wxString * GetName() const
DB_STR_REF m_PinNumberStr
const wxString * GetNumber() const
PIN_NUMBER(const BLK_0x08_PIN_NUMBER &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
const PIN_NAME * GetPinName() const
const NET * GetNet() const
PLACED_PAD(const BRD_DB &aBrd, const BLK_0x32_PLACED_PAD &aBlk)
const wxString * GetPinName() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
const wxString * GetPinNumber() const
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
SHAPE_SEG_OBJ(const BRD_DB &aBrd, const BLK_0x0E_SHAPE_SEG &aBlk)
TRACK(const BRD_DB &aBrd, const BLK_0x05_TRACK &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
VIA(const BRD_DB &aBrd, const BLK_0x33_VIA &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.
When processing a view, some objects are available and some are not.
const FOOTPRINT_INSTANCE * m_FootprintInstance
const FUNCTION_INSTANCE * m_Function
const COMPONENT * m_Component
const COMPONENT_INST * m_ComponentInstance
XREF_OBJ(const BLK_0x12_XREF &aBlk)
bool ResolveRefs(const DB_OBJ_RESOLVER &aResolver) override
Called when all objects in the DB are read and can be resolved by their IDs by other objects.