KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

ATTRIBUTE_ID AttributeID
 
wxString Value
 
bool ReadOnly = false
 
bool HasLocation = false
 Flag to know if this ATTRIBUTE_VALUE has a location i.e. More...
 
ATTRIBUTE_LOCATION AttributeLocation
 

Detailed Description

Definition at line 724 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1175 of file cadstar_archive_parser.cpp.

1176 {
1177  wxASSERT( aNode->GetName() == wxT( "ATTR" ) );
1178 
1179  AttributeID = GetXmlAttributeIDString( aNode, 0 );
1180  Value = GetXmlAttributeIDString( aNode, 1 );
1181 
1182  XNODE* cNode = aNode->GetChildren();
1183 
1184  for( ; cNode; cNode = cNode->GetNext() )
1185  {
1186  if( cNode->GetName() == wxT( "READONLY" ) )
1187  {
1188  ReadOnly = true;
1189  }
1190  else if( cNode->GetName() == wxT( "ATTRLOC" ) )
1191  {
1192  AttributeLocation.Parse( cNode, aContext );
1193  HasLocation = true;
1194  }
1195  else
1196  {
1197  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), wxT( "ATTR" ) );
1198  }
1199  }
1200 }
bool HasLocation
Flag to know if this ATTRIBUTE_VALUE has a location i.e.
XNODE * GetChildren() const
Definition: xnode.h:62
virtual void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_ARCHIVE_PARSER::SYMDEF::ParseSubNode(), CADSTAR_ARCHIVE_PARSER::NET::CONNECTION::ParseSubNode(), and CADSTAR_ARCHIVE_PARSER::NET::ParseSubNode().

Member Data Documentation

◆ AttributeID

◆ AttributeLocation

◆ HasLocation

bool CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::HasLocation = false

Flag to know if this ATTRIBUTE_VALUE has a location i.e.

is displayed

Definition at line 729 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadComponentAttributes(), and CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances().

◆ ReadOnly

bool CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::ReadOnly = false

Definition at line 728 of file cadstar_archive_parser.h.

◆ Value

wxString CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Value

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