KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::HATCH Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::HATCH:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

long Step
 
long LineWidth
 
long OrientAngle
 1/1000 of a Degree More...
 

Detailed Description

Definition at line 289 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 222 of file cadstar_archive_parser.cpp.

223 {
224  wxASSERT( aNode->GetName() == wxT( "HATCH" ) );
225 
226  Step = GetXmlAttributeIDLong( aNode, 0 );
227  LineWidth = GetXmlAttributeIDLong( aNode, 2 );
228 
229  XNODE* cNode = aNode->GetChildren();
230 
231  if( !cNode || cNode->GetName() != wxT( "ORIENT" ) )
232  THROW_MISSING_NODE_IO_ERROR( wxT( "ORIENT" ), wxT( "HATCH" ) );
233 
234  OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
235 }
XNODE * GetChildren() const
Definition: xnode.h:62
#define THROW_MISSING_NODE_IO_ERROR(nodename, location)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:43

References XNODE::GetChildren(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), and THROW_MISSING_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::HATCHCODE::Parse().

Member Data Documentation

◆ LineWidth

long CADSTAR_ARCHIVE_PARSER::HATCH::LineWidth

Definition at line 292 of file cadstar_archive_parser.h.

◆ OrientAngle

long CADSTAR_ARCHIVE_PARSER::HATCH::OrientAngle

1/1000 of a Degree

Definition at line 293 of file cadstar_archive_parser.h.

◆ Step

long CADSTAR_ARCHIVE_PARSER::HATCH::Step

Definition at line 291 of file cadstar_archive_parser.h.


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