KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO::DB_OBJ Struct Referenceabstract

A DB_OBJ represents one object in an Allegro database. More...

#include <allegro_db.h>

Inheritance diagram for ALLEGRO::DB_OBJ:
ALLEGRO::BRD_DB_OBJ ALLEGRO::ARC ALLEGRO::COMPONENT ALLEGRO::COMPONENT_INST ALLEGRO::CONNECTION_OBJ ALLEGRO::FIELD ALLEGRO::FOOTPRINT_DEF ALLEGRO::FOOTPRINT_INSTANCE ALLEGRO::FUNCTION_INSTANCE ALLEGRO::FUNCTION_SLOT ALLEGRO::GRAPHIC_SEG ALLEGRO::LINE ALLEGRO::NET ALLEGRO::NET_ASSIGN ALLEGRO::PIN_NAME ALLEGRO::PIN_NUMBER ALLEGRO::PLACED_PAD ALLEGRO::PTR_ARRAY ALLEGRO::RECT_OBJ ALLEGRO::SHAPE ALLEGRO::TRACK ALLEGRO::UNKNOWN_0x20 ALLEGRO::VIA ALLEGRO::XREF_OBJ

Classes

struct  FILE_LOC
 

Public Types

using TYPE_ID = uint8_t
 

Public Member Functions

 DB_OBJ (uint32_t aKey, uint32_t aNextKey)
 
 DB_OBJ ()
 
virtual ~DB_OBJ ()
 
virtual TYPE_ID GetType () const =0
 All blocks are denoted by a type which allows dispatch to the appropriate subclass.
 
virtual const char * TypeName () const
 
virtual bool ResolveRefs (const DB_OBJ_RESOLVER &aResolver)=0
 Called when all objects in the DB are read and can be resolved by their IDs by other objects.
 
uint32_t GetKey () const
 
virtual const DB_REFGetNext () const
 Return the reference to the next object in the default chain for this object.
 

Public Attributes

bool m_Valid
 
uint32_t m_Key
 
FILE_LOC m_Loc
 
DB_REF m_Next
 

Detailed Description

A DB_OBJ represents one object in an Allegro database.

Definition at line 167 of file allegro_db.h.

Member Typedef Documentation

◆ TYPE_ID

using ALLEGRO::DB_OBJ::TYPE_ID = uint8_t

Definition at line 169 of file allegro_db.h.

Constructor & Destructor Documentation

◆ DB_OBJ() [1/2]

ALLEGRO::DB_OBJ::DB_OBJ ( uint32_t aKey,
uint32_t aNextKey )
inline

◆ DB_OBJ() [2/2]

ALLEGRO::DB_OBJ::DB_OBJ ( )
inline

Definition at line 186 of file allegro_db.h.

References DB_OBJ().

◆ ~DB_OBJ()

virtual ALLEGRO::DB_OBJ::~DB_OBJ ( )
inlinevirtual

Definition at line 191 of file allegro_db.h.

Member Function Documentation

◆ GetKey()

◆ GetNext()

virtual const DB_REF & ALLEGRO::DB_OBJ::GetNext ( ) const
inlinevirtual

Return the reference to the next object in the default chain for this object.

Some methods of iterating use other "nexts" in the object, fo those you should use the appropriate field instead of this method.

Reimplemented in ALLEGRO::PTR_ARRAY.

Definition at line 227 of file allegro_db.h.

References m_Next.

Referenced by GetPrimaryNext().

◆ GetType()

virtual TYPE_ID ALLEGRO::DB_OBJ::GetType ( ) const
pure virtual

◆ ResolveRefs()

virtual bool ALLEGRO::DB_OBJ::ResolveRefs ( const DB_OBJ_RESOLVER & aResolver)
pure virtual

Called when all objects in the DB are read and can be resolved by their IDs by other objects.

Exactly what fields a given object needs to resolve and what happens if the resolution fails is up to that object.

This can also validate that the objects found are of the expected types.

Before calling this, you cannot expect an DB_REF to have a valid target.

Returns
true if all fields in the object are resolved and valid

Implemented in ALLEGRO::ARC, ALLEGRO::COMPONENT, ALLEGRO::COMPONENT_INST, ALLEGRO::CONNECTION_OBJ, ALLEGRO::FIELD, ALLEGRO::FOOTPRINT_DEF, ALLEGRO::FOOTPRINT_INSTANCE, ALLEGRO::FUNCTION_INSTANCE, ALLEGRO::FUNCTION_SLOT, ALLEGRO::GRAPHIC_SEG, ALLEGRO::LINE, ALLEGRO::NET, ALLEGRO::NET_ASSIGN, ALLEGRO::PIN_NAME, ALLEGRO::PIN_NUMBER, ALLEGRO::PLACED_PAD, ALLEGRO::PTR_ARRAY, ALLEGRO::RECT_OBJ, ALLEGRO::SHAPE, ALLEGRO::TRACK, ALLEGRO::UNKNOWN_0x20, ALLEGRO::VIA, and ALLEGRO::XREF_OBJ.

◆ TypeName()

Member Data Documentation

◆ m_Key

◆ m_Loc

FILE_LOC ALLEGRO::DB_OBJ::m_Loc

Definition at line 237 of file allegro_db.h.

Referenced by DB_OBJ().

◆ m_Next

DB_REF ALLEGRO::DB_OBJ::m_Next

Definition at line 239 of file allegro_db.h.

Referenced by ALLEGRO::ARC::ARC(), ALLEGRO::COMPONENT::COMPONENT(), ALLEGRO::COMPONENT_INST::COMPONENT_INST(), ALLEGRO::CONNECTION_OBJ::CONNECTION_OBJ(), DB_OBJ(), ALLEGRO::FIELD::FIELD(), ALLEGRO::FOOTPRINT_DEF::FOOTPRINT_DEF(), ALLEGRO::FOOTPRINT_INSTANCE::FOOTPRINT_INSTANCE(), GetNext(), ALLEGRO::PTR_ARRAY::GetNext(), ALLEGRO::COMPONENT_INST::GetNextInstance(), ALLEGRO::GRAPHIC_SEG::GRAPHIC_SEG(), ALLEGRO::LINE::LINE(), ALLEGRO::NET::NET(), ALLEGRO::NET_ASSIGN::NET_ASSIGN(), ALLEGRO::PIN_NAME::PIN_NAME(), ALLEGRO::PIN_NUMBER::PIN_NUMBER(), ALLEGRO::PLACED_PAD::PLACED_PAD(), ALLEGRO::PTR_ARRAY::PTR_ARRAY(), ALLEGRO::RECT_OBJ::RECT_OBJ(), ALLEGRO::ARC::ResolveRefs(), ALLEGRO::COMPONENT::ResolveRefs(), ALLEGRO::COMPONENT_INST::ResolveRefs(), ALLEGRO::CONNECTION_OBJ::ResolveRefs(), ALLEGRO::FOOTPRINT_DEF::ResolveRefs(), ALLEGRO::FOOTPRINT_INSTANCE::ResolveRefs(), ALLEGRO::GRAPHIC_SEG::ResolveRefs(), ALLEGRO::LINE::ResolveRefs(), ALLEGRO::NET::ResolveRefs(), ALLEGRO::NET_ASSIGN::ResolveRefs(), ALLEGRO::PIN_NAME::ResolveRefs(), ALLEGRO::PIN_NUMBER::ResolveRefs(), ALLEGRO::PLACED_PAD::ResolveRefs(), ALLEGRO::PTR_ARRAY::ResolveRefs(), ALLEGRO::RECT_OBJ::ResolveRefs(), ALLEGRO::SHAPE::ResolveRefs(), ALLEGRO::TRACK::ResolveRefs(), ALLEGRO::UNKNOWN_0x20::ResolveRefs(), ALLEGRO::VIA::ResolveRefs(), ALLEGRO::SHAPE::SHAPE(), ALLEGRO::TRACK::TRACK(), ALLEGRO::UNKNOWN_0x20::UNKNOWN_0x20(), ALLEGRO::VIA::VIA(), ALLEGRO::BRD_DB::VisitComponents(), ALLEGRO::BRD_DB::VisitFootprintDefs(), and ALLEGRO::BRD_DB::VisitNets().

◆ m_Valid

bool ALLEGRO::DB_OBJ::m_Valid

Definition at line 233 of file allegro_db.h.

Referenced by DB_OBJ().


The documentation for this struct was generated from the following file: