KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB:
CADSTAR_ARCHIVE_PARSER::CODEDEFS CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 
bool ParseSubNode (XNODE *aChildNode, PARSER_CONTEXT *aContext)
 

Public Attributes

std::map< COPPERCODE_ID, COPPERCODECopperCodes
 
std::map< SPACINGCODE_ID, SPACINGCODESpacingCodes
 Spacing Design Rules. More...
 
std::map< RULESET_ID, RULESETRulesets
 Used for area design rules. More...
 
std::map< PADCODE_ID, PADCODEPadCodes
 
std::map< VIACODE_ID, VIACODEViaCodes
 
std::map< LAYERPAIR_ID, LAYERPAIRLayerPairs
 Default vias to use between pairs of layers. More...
 
std::vector< SPCCLASSSPACESpacingClasses
 
std::map< LINECODE_ID, LINECODELineCodes
 
std::map< HATCHCODE_ID, HATCHCODEHatchCodes
 
std::map< TEXTCODE_ID, TEXTCODETextCodes
 
std::map< ROUTECODE_ID, ROUTECODERouteCodes
 
std::map< ATTRIBUTE_ID, ATTRNAMEAttributeNames
 
std::map< NETCLASS_ID, CADSTAR_NETCLASSNetClasses
 
std::map< SPACING_CLASS_ID, SPCCLASSNAMESpacingClassNames
 

Detailed Description

Definition at line 384 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 250 of file cadstar_pcb_archive_parser.cpp.

251{
252 wxASSERT( aNode->GetName() == wxT( "CODEDEFS" ) );
253
254 XNODE* cNode = aNode->GetChildren();
255
256 for( ; cNode; cNode = cNode->GetNext() )
257 {
258 wxString nodeName = cNode->GetName();
259
260 if( ParseSubNode( cNode, aContext ) ) // in CADSTAR_ARCHIVE_PARSER::CODEDEFS
261 {
262 }
263 else if( nodeName == wxT( "COPPERCODE" ) )
264 {
265 COPPERCODE coppercode;
266 coppercode.Parse( cNode, aContext );
267 CopperCodes.insert( std::make_pair( coppercode.ID, coppercode ) );
268 }
269 else if( nodeName == wxT( "SPACINGCODE" ) )
270 {
271 SPACINGCODE spacingcode;
272 spacingcode.Parse( cNode, aContext );
273 SpacingCodes.insert( std::make_pair( spacingcode.ID, spacingcode ) );
274 }
275 else if( nodeName == wxT( "RULESET" ) )
276 {
277 RULESET ruleset;
278 ruleset.Parse( cNode, aContext );
279 Rulesets.insert( std::make_pair( ruleset.ID, ruleset ) );
280 }
281 else if( nodeName == wxT( "PADCODE" ) )
282 {
283 PADCODE padcode;
284 padcode.Parse( cNode, aContext );
285 PadCodes.insert( std::make_pair( padcode.ID, padcode ) );
286 }
287 else if( nodeName == wxT( "VIACODE" ) )
288 {
289 VIACODE viacode;
290 viacode.Parse( cNode, aContext );
291 ViaCodes.insert( std::make_pair( viacode.ID, viacode ) );
292 }
293 else if( nodeName == wxT( "LAYERPAIR" ) )
294 {
295 LAYERPAIR layerpair;
296 layerpair.Parse( cNode, aContext );
297 LayerPairs.insert( std::make_pair( layerpair.ID, layerpair ) );
298 }
299 else if( nodeName == wxT( "SPCCLASSSPACE" ) )
300 {
301 SPCCLASSSPACE spcclassspace;
302 spcclassspace.Parse( cNode, aContext );
303 SpacingClasses.push_back( spcclassspace );
304 }
305 else
306 {
307 THROW_UNKNOWN_NODE_IO_ERROR( nodeName, aNode->GetName() );
308 }
309 }
310}
#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
bool ParseSubNode(XNODE *aChildNode, PARSER_CONTEXT *aContext)
std::map< COPPERCODE_ID, COPPERCODE > CopperCodes
std::map< RULESET_ID, RULESET > Rulesets
Used for area design rules.
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Spacing Design Rules.
std::map< LAYERPAIR_ID, LAYERPAIR > LayerPairs
Default vias to use between pairs of layers.

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::ID, CADSTAR_PCB_ARCHIVE_PARSER::RULESET::ID, CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PADCODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::LAYERPAIR::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::SPCCLASSSPACE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::RULESET::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::ASSIGNMENTS::Parse().

◆ ParseSubNode()

bool CADSTAR_ARCHIVE_PARSER::CODEDEFS::ParseSubNode ( XNODE aChildNode,
PARSER_CONTEXT aContext 
)
inherited

Definition at line 1441 of file cadstar_archive_parser.cpp.

1442{
1443 wxString nodeName = aChildNode->GetName();
1444
1445 if( nodeName == wxT( "LINECODE" ) )
1446 {
1447 LINECODE linecode;
1448 linecode.Parse( aChildNode, aContext );
1449 LineCodes.insert( std::make_pair( linecode.ID, linecode ) );
1450 }
1451 else if( nodeName == wxT( "HATCHCODE" ) )
1452 {
1453 HATCHCODE hatchcode;
1454 hatchcode.Parse( aChildNode, aContext );
1455 HatchCodes.insert( std::make_pair( hatchcode.ID, hatchcode ) );
1456 }
1457 else if( nodeName == wxT( "TEXTCODE" ) )
1458 {
1459 TEXTCODE textcode;
1460 textcode.Parse( aChildNode, aContext );
1461 TextCodes.insert( std::make_pair( textcode.ID, textcode ) );
1462 }
1463 else if( nodeName == wxT( "ROUTECODE" ) )
1464 {
1465 ROUTECODE routecode;
1466 routecode.Parse( aChildNode, aContext );
1467 RouteCodes.insert( std::make_pair( routecode.ID, routecode ) );
1468 }
1469 else if( nodeName == wxT( "ATTRNAME" ) )
1470 {
1471 ATTRNAME attrname;
1472 attrname.Parse( aChildNode, aContext );
1473 AttributeNames.insert( std::make_pair( attrname.ID, attrname ) );
1474 }
1475 else if( nodeName == wxT( "NETCLASS" ) )
1476 {
1477 CADSTAR_NETCLASS netclass;
1478 netclass.Parse( aChildNode, aContext );
1479 NetClasses.insert( std::make_pair( netclass.ID, netclass ) );
1480 }
1481 else if( nodeName == wxT( "SPCCLASSNAME" ) )
1482 {
1483 SPCCLASSNAME spcclassname;
1484 spcclassname.Parse( aChildNode, aContext );
1485 SpacingClassNames.insert( std::make_pair( spcclassname.ID, spcclassname ) );
1486 }
1487 else
1488 {
1489 return false;
1490 }
1491
1492 return true;
1493}
std::map< SPACING_CLASS_ID, SPCCLASSNAME > SpacingClassNames
std::map< LINECODE_ID, LINECODE > LineCodes
std::map< NETCLASS_ID, CADSTAR_NETCLASS > NetClasses
std::map< HATCHCODE_ID, HATCHCODE > HatchCodes
std::map< ATTRIBUTE_ID, ATTRNAME > AttributeNames
std::map< ROUTECODE_ID, ROUTECODE > RouteCodes
std::map< TEXTCODE_ID, TEXTCODE > TextCodes

References CADSTAR_ARCHIVE_PARSER::LINECODE::ID, CADSTAR_ARCHIVE_PARSER::HATCHCODE::ID, CADSTAR_ARCHIVE_PARSER::TEXTCODE::ID, CADSTAR_ARCHIVE_PARSER::ROUTECODE::ID, CADSTAR_ARCHIVE_PARSER::ATTRNAME::ID, CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::ID, CADSTAR_ARCHIVE_PARSER::SPCCLASSNAME::ID, CADSTAR_ARCHIVE_PARSER::LINECODE::Parse(), CADSTAR_ARCHIVE_PARSER::HATCHCODE::Parse(), CADSTAR_ARCHIVE_PARSER::TEXTCODE::Parse(), CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse(), CADSTAR_ARCHIVE_PARSER::ATTRNAME::Parse(), CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::Parse(), and CADSTAR_ARCHIVE_PARSER::SPCCLASSNAME::Parse().

Member Data Documentation

◆ AttributeNames

std::map<ATTRIBUTE_ID, ATTRNAME> CADSTAR_ARCHIVE_PARSER::CODEDEFS::AttributeNames
inherited

◆ CopperCodes

std::map<COPPERCODE_ID, COPPERCODE> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::CopperCodes

◆ HatchCodes

std::map<HATCHCODE_ID, HATCHCODE> CADSTAR_ARCHIVE_PARSER::CODEDEFS::HatchCodes
inherited

Definition at line 815 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getHatchCode().

◆ LayerPairs

std::map<LAYERPAIR_ID, LAYERPAIR> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::LayerPairs

Default vias to use between pairs of layers.

Definition at line 392 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getLayerPair().

◆ LineCodes

◆ NetClasses

std::map<NETCLASS_ID, CADSTAR_NETCLASS> CADSTAR_ARCHIVE_PARSER::CODEDEFS::NetClasses
inherited

Definition at line 819 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ PadCodes

std::map<PADCODE_ID, PADCODE> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::PadCodes

◆ RouteCodes

std::map<ROUTECODE_ID, ROUTECODE> CADSTAR_ARCHIVE_PARSER::CODEDEFS::RouteCodes
inherited

◆ Rulesets

std::map<RULESET_ID, RULESET> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::Rulesets

Used for area design rules.

Definition at line 388 of file cadstar_pcb_archive_parser.h.

◆ SpacingClasses

std::vector<SPCCLASSSPACE> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::SpacingClasses

Definition at line 393 of file cadstar_pcb_archive_parser.h.

◆ SpacingClassNames

std::map<SPACING_CLASS_ID, SPCCLASSNAME> CADSTAR_ARCHIVE_PARSER::CODEDEFS::SpacingClassNames
inherited

Definition at line 820 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ SpacingCodes

std::map<SPACINGCODE_ID, SPACINGCODE> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::SpacingCodes

◆ TextCodes

std::map<TEXTCODE_ID, TEXTCODE> CADSTAR_ARCHIVE_PARSER::CODEDEFS::TextCodes
inherited

◆ ViaCodes

std::map<VIACODE_ID, VIACODE> CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::ViaCodes

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