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 768 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 1288 of file cadstar_archive_parser.cpp.

1289{
1290 wxASSERT( aNode->GetName() == wxT( "ATTR" ) );
1291
1293 Value = GetXmlAttributeIDString( aNode, 1 );
1294
1295 XNODE* cNode = aNode->GetChildren();
1296
1297 for( ; cNode; cNode = cNode->GetNext() )
1298 {
1299 if( cNode->GetName() == wxT( "READONLY" ) )
1300 {
1301 ReadOnly = true;
1302 }
1303 else if( cNode->GetName() == wxT( "ATTRLOC" ) )
1304 {
1305 AttributeLocation.Parse( cNode, aContext );
1306 HasLocation = true;
1307 }
1308 else
1309 {
1310 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), wxT( "ATTR" ) );
1311 }
1312 }
1313}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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
virtual void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool HasLocation
Flag to know if this ATTRIBUTE_VALUE has a location i.e.

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

Referenced by CADSTAR_ARCHIVE_PARSER::CADSTAR_NETCLASS::Parse(), CADSTAR_ARCHIVE_PARSER::FIGURE::Parse(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse(), CADSTAR_ARCHIVE_PARSER::PART::Parse(), CADSTAR_ARCHIVE_PARSER::DOCUMENTATION_SYMBOL::Parse(), CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_BOARD::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::AREA::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::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 773 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 772 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: