KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

std::map< GROUP_ID, GROUPGroups
 
std::map< REUSEBLOCK_ID, REUSEBLOCKReuseBlocks
 
std::map< FIGURE_ID, FIGUREFigures
 
std::map< SYMBOL_ID, SYMBOLSymbols
 
std::map< BUS_ID, BUSBuses
 
std::map< BLOCK_ID, BLOCKBlocks
 
std::map< NET_ID, NET_SCHNets
 
std::map< TEXT_ID, TEXTTexts
 
std::map< DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOLDocumentationSymbols
 
VARIANT_HIERARCHY VariantHierarchy
 
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUEAttributeValues
 

Detailed Description

Definition at line 427 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1133 of file cadstar_sch_archive_parser.cpp.

1134{
1135 wxCHECK( aNode->GetName() == wxT( "SCHEMATIC" ), );
1136
1137 XNODE* cNode = aNode->GetChildren();
1138
1139 for( ; cNode; cNode = cNode->GetNext() )
1140 {
1141 wxString cNodeName = cNode->GetName();
1142
1143 if( cNodeName == wxT( "GROUP" ) )
1144 {
1145 GROUP group;
1146 group.Parse( cNode, aContext );
1147 Groups.insert( std::make_pair( group.ID, group ) );
1148 }
1149 else if( cNodeName == wxT( "REUSEBLOCK" ) )
1150 {
1151 REUSEBLOCK reuseblock;
1152 reuseblock.Parse( cNode, aContext );
1153 ReuseBlocks.insert( std::make_pair( reuseblock.ID, reuseblock ) );
1154 }
1155 else if( cNodeName == wxT( "FIGURE" ) )
1156 {
1157 FIGURE figure;
1158 figure.Parse( cNode, aContext );
1159 Figures.insert( std::make_pair( figure.ID, figure ) );
1160 }
1161 else if( cNodeName == wxT( "SYMBOL" ) )
1162 {
1163 SYMBOL sym;
1164 sym.Parse( cNode, aContext );
1165 Symbols.insert( std::make_pair( sym.ID, sym ) );
1166 }
1167 else if( cNodeName == wxT( "BUS" ) )
1168 {
1169 BUS bus;
1170 bus.Parse( cNode, aContext );
1171 Buses.insert( std::make_pair( bus.ID, bus ) );
1172 }
1173 else if( cNodeName == wxT( "BLOCK" ) )
1174 {
1175 BLOCK block;
1176 block.Parse( cNode, aContext );
1177 Blocks.insert( std::make_pair( block.ID, block ) );
1178 }
1179 else if( cNodeName == wxT( "NET" ) )
1180 {
1181 NET_SCH net;
1182 net.Parse( cNode, aContext );
1183 Nets.insert( std::make_pair( net.ID, net ) );
1184 }
1185 else if( cNodeName == wxT( "TEXT" ) )
1186 {
1187 TEXT txt;
1188 txt.Parse( cNode, aContext );
1189 Texts.insert( std::make_pair( txt.ID, txt ) );
1190 }
1191 else if( cNodeName == wxT( "DOCSYMBOL" ) )
1192 {
1193 DOCUMENTATION_SYMBOL docsym;
1194 docsym.Parse( cNode, aContext );
1195 DocumentationSymbols.insert( std::make_pair( docsym.ID, docsym ) );
1196 }
1197 else if( cNodeName == wxT( "VHIERARCHY" ) )
1198 {
1199 VariantHierarchy.Parse( cNode, aContext );
1200 }
1201 else
1202 {
1203 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1204 }
1205
1206 aContext->CheckPointCallback();
1207 }
1208}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
@ BUS
This item represents a bus vector.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
std::map< REUSEBLOCK_ID, REUSEBLOCK > ReuseBlocks
std::map< DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL > DocumentationSymbols

References CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::CheckPointCallback, XNODE::GetChildren(), XNODE::GetNext(), group, CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::ID, CADSTAR_ARCHIVE_PARSER::FIGURE::ID, CADSTAR_ARCHIVE_PARSER::TEXT::ID, CADSTAR_ARCHIVE_PARSER::NET::ID, CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::ID, CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::ID, CADSTAR_SCH_ARCHIVE_PARSER::BUS::ID, CADSTAR_SCH_ARCHIVE_PARSER::BLOCK::ID, CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), CADSTAR_ARCHIVE_PARSER::TEXT::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BUS::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::BLOCK::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ AttributeValues

std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::AttributeValues

Definition at line 439 of file cadstar_sch_archive_parser.h.

◆ Blocks

◆ Buses

std::map<BUS_ID, BUS> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Buses

◆ DocumentationSymbols

std::map<DOCUMENTATION_SYMBOL_ID, DOCUMENTATION_SYMBOL> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::DocumentationSymbols

◆ Figures

std::map<FIGURE_ID, FIGURE> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Figures

◆ Groups

std::map<GROUP_ID, GROUP> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Groups

Definition at line 429 of file cadstar_sch_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().

◆ Nets

std::map<NET_ID, NET_SCH> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Nets

Definition at line 435 of file cadstar_sch_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadNets().

◆ ReuseBlocks

std::map<REUSEBLOCK_ID, REUSEBLOCK> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::ReuseBlocks

Definition at line 430 of file cadstar_sch_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().

◆ Symbols

◆ Texts

std::map<TEXT_ID, TEXT> CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Texts

Definition at line 436 of file cadstar_sch_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::loadTexts().

◆ VariantHierarchy

VARIANT_HIERARCHY CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::VariantHierarchy

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