KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::GRID Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::GRID:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Static Public Member Functions

static bool IsGrid (XNODE *aNode)
 

Public Attributes

GRID_TYPE Type
 
wxString Name
 
long Param1
 Either Units or X step, depending on Type (see GRID_TYPE for more details) More...
 
long Param2
 Either Divisor or Y step, depending on Type (see GRID_TYPE for more details) More...
 

Detailed Description

Definition at line 536 of file cadstar_archive_parser.h.

Member Function Documentation

◆ IsGrid()

bool CADSTAR_ARCHIVE_PARSER::GRID::IsGrid ( XNODE aNode)
static

Definition at line 698 of file cadstar_archive_parser.cpp.

699{
700 wxString aNodeName = aNode->GetName();
701
702 if( aNodeName == wxT( "FRACTIONALGRID" ) || aNodeName == wxT( "STEPGRID" ) )
703 return true;
704 else
705 return false;
706}

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

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 709 of file cadstar_archive_parser.cpp.

710{
711 wxASSERT( IsGrid( aNode ) );
712
713 wxString aNodeName = aNode->GetName();
714
715 if( aNodeName == wxT( "FRACTIONALGRID" ) )
717 else if( aNodeName == wxT( "STEPGRID" ) )
719 else
720 wxASSERT_MSG( true, wxT( "Unknown Grid Type" ) );
721
722 Name = GetXmlAttributeIDString( aNode, 0 );
723 Param1 = GetXmlAttributeIDLong( aNode, 1 );
724 Param2 = GetXmlAttributeIDLong( aNode, 2 );
725}
@ STEPGRID
Param1 = X Step, Param2 = Y Step. A standard x,y grid.
@ FRACTIONALGRID
Param1 = Units, Param2 = Divisor.
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static bool IsGrid(XNODE *aNode)
long Param1
Either Units or X step, depending on Type (see GRID_TYPE for more details)
long Param2
Either Divisor or Y step, depending on Type (see GRID_TYPE for more details)

References CADSTAR_ARCHIVE_PARSER::FRACTIONALGRID, CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and CADSTAR_ARCHIVE_PARSER::STEPGRID.

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

Member Data Documentation

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::GRID::Name

Definition at line 539 of file cadstar_archive_parser.h.

◆ Param1

long CADSTAR_ARCHIVE_PARSER::GRID::Param1

Either Units or X step, depending on Type (see GRID_TYPE for more details)

Definition at line 540 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().

◆ Param2

long CADSTAR_ARCHIVE_PARSER::GRID::Param2

Either Divisor or Y step, depending on Type (see GRID_TYPE for more details)

Definition at line 542 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().

◆ Type

GRID_TYPE CADSTAR_ARCHIVE_PARSER::GRID::Type

Definition at line 538 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().


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