KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::SYMDEF Struct Referenceabstract

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::SYMDEF:
CADSTAR_ARCHIVE_PARSER::PARSER CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM

Public Member Functions

void ParseIdentifiers (XNODE *aNode, PARSER_CONTEXT *aContext)
 
bool ParseSubNode (XNODE *aChildNode, PARSER_CONTEXT *aContext)
 
virtual void Parse (XNODE *aNode, PARSER_CONTEXT *aContext)=0
 

Public Attributes

SYMDEF_ID ID
 
wxString ReferenceName
 This is the name which identifies the symbol in the library Multiple components may exist with the same ReferenceName. More...
 
wxString Alternate
 This is in addition to ReferenceName. More...
 
POINT Origin
 Origin of the component (this is used as the reference point when placing the component in the design) More...
 
bool Stub = false
 When the CADSTAR Archive file is exported without the component library, if components on the board are still exported, the Reference and Alternate names will still be exported but the content is replaced with a "STUB" atom, requiring access to the original library for component definition. More...
 
long Version = UNDEFINED_VALUE
 Version is a sequential integer number to identify discrepancies between the library and the design. More...
 
std::map< FIGURE_ID, FIGUREFigures
 
std::map< TEXT_ID, TEXTTexts
 
std::map< ATTRIBUTE_ID, TEXT_LOCATIONTextLocations
 This contains location of any attributes, including designator position. More...
 
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUEAttributeValues
 These attributes might also have a location. More...
 

Detailed Description

Definition at line 906 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

virtual void CADSTAR_ARCHIVE_PARSER::PARSER::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
pure virtualinherited

Implemented in CADSTAR_ARCHIVE_PARSER::PARTNAMECOL, CADSTAR_ARCHIVE_PARSER::ATTRCOLORS, CADSTAR_ARCHIVE_PARSER::ATTRCOL, CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS, CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL, CADSTAR_ARCHIVE_PARSER::NET::JUNCTION, CADSTAR_PCB_ARCHIVE_PARSER::COPPER, CADSTAR_ARCHIVE_PARSER::PARTS, CADSTAR_ARCHIVE_PARSER::PART, CADSTAR_ARCHIVE_PARSER::PART::PART_PIN, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GATE, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN_EQUIVALENCE, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN, CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB, CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::CONNECTION_PCB, CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::COPPER_TERMINAL, CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::VIA, CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::GATE, CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT, CADSTAR_ARCHIVE_PARSER::TEXT, CADSTAR_ARCHIVE_PARSER::FIGURE, CADSTAR_ARCHIVE_PARSER::GROUP, CADSTAR_PCB_ARCHIVE_PARSER::AREA, CADSTAR_ARCHIVE_PARSER::REUSEBLOCKREF, CADSTAR_ARCHIVE_PARSER::REUSEBLOCK, CADSTAR_PCB_ARCHIVE_PARSER::SYMDEF_PCB, CADSTAR_ARCHIVE_PARSER::SPCCLASSNAME, CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS, CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE, CADSTAR_ARCHIVE_PARSER::ATTRNAME, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION, CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNWIDTH, CADSTAR_ARCHIVE_PARSER::ATTRNAME::COLUMNORDER, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_LOCATION, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE, CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::ARROW, CADSTAR_ARCHIVE_PARSER::SETTINGS, CADSTAR_ARCHIVE_PARSER::GRIDS, CADSTAR_PCB_ARCHIVE_PARSER::PAD_EXITS, CADSTAR_ARCHIVE_PARSER::GRID, CADSTAR_ARCHIVE_PARSER::SHAPE, CADSTAR_ARCHIVE_PARSER::CUTOUT, CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_COPPER, CADSTAR_ARCHIVE_PARSER::VERTEX, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH, CADSTAR_PCB_ARCHIVE_PARSER::TECHNOLOGY_SECTION, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::CONNECTION_SCH, CADSTAR_ARCHIVE_PARSER::LONGPOINT, CADSTAR_ARCHIVE_PARSER::POINT, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER, CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB, CADSTAR_ARCHIVE_PARSER::EVALUE, CADSTAR_PCB_ARCHIVE_PARSER::RULESET, CADSTAR_ARCHIVE_PARSER::ROUTECODE, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BUS_TERM, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM, CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN, CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH, CADSTAR_ARCHIVE_PARSER::TEXTCODE, CADSTAR_SCH_ARCHIVE_PARSER::BLOCK, CADSTAR_PCB_ARCHIVE_PARSER::VIACODE, CADSTAR_ARCHIVE_PARSER::FONT, CADSTAR_SCH_ARCHIVE_PARSER::BUS, CADSTAR_ARCHIVE_PARSER::HATCHCODE, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE, CADSTAR_ARCHIVE_PARSER::HATCH, CADSTAR_SCH_ARCHIVE_PARSER::SIGLOC, CADSTAR_ARCHIVE_PARSER::LINECODE, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL, CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE, CADSTAR_ARCHIVE_PARSER::VARIANT_HIERARCHY, CADSTAR_ARCHIVE_PARSER::VARIANT, CADSTAR_ARCHIVE_PARSER::HEADER, CADSTAR_SCH_ARCHIVE_PARSER::SIGNALREFERENCELINK, CADSTAR_ARCHIVE_PARSER::TIMESTAMP, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT, CADSTAR_ARCHIVE_PARSER::FORMAT, CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL, CADSTAR_SCH_ARCHIVE_PARSER::PARTREF, CADSTAR_SCH_ARCHIVE_PARSER::COMP, CADSTAR_SCH_ARCHIVE_PARSER::SHEETS, CADSTAR_SCH_ARCHIVE_PARSER::SYMDEF_SCM, CADSTAR_SCH_ARCHIVE_PARSER::PIN_NUM_LABEL_LOC, CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL, CADSTAR_SCH_ARCHIVE_PARSER::ASSIGNMENTS_SCM, CADSTAR_SCH_ARCHIVE_PARSER::CODEDEFS_SCM, and CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL_SHAPE.

◆ ParseIdentifiers()

void CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseIdentifiers ( XNODE aNode,
PARSER_CONTEXT aContext 
)

Definition at line 1594 of file cadstar_archive_parser.cpp.

1595 {
1596  wxASSERT( aNode->GetName() == wxT( "SYMDEF" ) );
1597 
1598  ID = GetXmlAttributeIDString( aNode, 0 );
1599  ReferenceName = GetXmlAttributeIDString( aNode, 1 );
1600  Alternate = GetXmlAttributeIDString( aNode, 2 );
1601 }
wxString ReferenceName
This is the name which identifies the symbol in the library Multiple components may exist with the sa...
wxString Alternate
This is in addition to ReferenceName.
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString().

◆ ParseSubNode()

bool CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseSubNode ( XNODE aChildNode,
PARSER_CONTEXT aContext 
)

Definition at line 1604 of file cadstar_archive_parser.cpp.

1605 {
1606  wxString cNodeName = aChildNode->GetName();
1607 
1608  if( cNodeName == wxT( "PT" ) )
1609  {
1610  Origin.Parse( aChildNode, aContext );
1611  }
1612  else if( cNodeName == wxT( "STUB" ) )
1613  {
1614  Stub = true;
1615  }
1616  else if( cNodeName == wxT( "VERSION" ) )
1617  {
1618  Version = GetXmlAttributeIDLong( aChildNode, 0 );
1619  }
1620  else if( cNodeName == wxT( "FIGURE" ) )
1621  {
1622  FIGURE figure;
1623  figure.Parse( aChildNode, aContext );
1624  Figures.insert( std::make_pair( figure.ID, figure ) );
1625  }
1626  else if( cNodeName == wxT( "TEXT" ) )
1627  {
1628  TEXT txt;
1629  txt.Parse( aChildNode, aContext );
1630  Texts.insert( std::make_pair( txt.ID, txt ) );
1631  }
1632  else if( cNodeName == wxT( "TEXTLOC" ) )
1633  {
1634  TEXT_LOCATION textloc;
1635  textloc.Parse( aChildNode, aContext );
1636  TextLocations.insert( std::make_pair( textloc.AttributeID, textloc ) );
1637  }
1638  else if( cNodeName == wxT( "ATTR" ) )
1639  {
1640  ATTRIBUTE_VALUE attrVal;
1641  attrVal.Parse( aChildNode, aContext );
1642  AttributeValues.insert( std::make_pair( attrVal.AttributeID, attrVal ) );
1643  }
1644  else
1645  {
1646  return false;
1647  }
1648 
1649  return true;
1650 }
std::map< FIGURE_ID, FIGURE > Figures
bool Stub
When the CADSTAR Archive file is exported without the component library, if components on the board a...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
These attributes might also have a location.
POINT Origin
Origin of the component (this is used as the reference point when placing the component in the design...
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
long Version
Version is a sequential integer number to identify discrepancies between the library and the design.
std::map< ATTRIBUTE_ID, TEXT_LOCATION > TextLocations
This contains location of any attributes, including designator position.

References CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::AttributeID, CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION::AttributeID, CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::FIGURE::ID, CADSTAR_ARCHIVE_PARSER::TEXT::ID, CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT_LOCATION::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), and CADSTAR_ARCHIVE_PARSER::TEXT::Parse().

Member Data Documentation

◆ Alternate

◆ AttributeValues

std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> CADSTAR_ARCHIVE_PARSER::SYMDEF::AttributeValues

These attributes might also have a location.

Definition at line 929 of file cadstar_archive_parser.h.

◆ Figures

◆ ID

◆ Origin

POINT CADSTAR_ARCHIVE_PARSER::SYMDEF::Origin

◆ ReferenceName

wxString CADSTAR_ARCHIVE_PARSER::SYMDEF::ReferenceName

◆ Stub

bool CADSTAR_ARCHIVE_PARSER::SYMDEF::Stub = false

When the CADSTAR Archive file is exported without the component library, if components on the board are still exported, the Reference and Alternate names will still be exported but the content is replaced with a "STUB" atom, requiring access to the original library for component definition.

Definition at line 915 of file cadstar_archive_parser.h.

◆ TextLocations

std::map<ATTRIBUTE_ID, TEXT_LOCATION> CADSTAR_ARCHIVE_PARSER::SYMDEF::TextLocations

This contains location of any attributes, including designator position.

Definition at line 926 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances().

◆ Texts

◆ Version

long CADSTAR_ARCHIVE_PARSER::SYMDEF::Version = UNDEFINED_VALUE

Version is a sequential integer number to identify discrepancies between the library and the design.

Definition at line 921 of file cadstar_archive_parser.h.


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