KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::GRIDS Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::GRIDS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

GRID WorkingGrid
 
GRID ScreenGrid
 From CADSTAR Help: "There is one Screen Grid, which is visible as dots on the screen. More...
 
std::vector< GRIDUserGrids
 List of predefined grids created by the user. More...
 

Detailed Description

Definition at line 543 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 719 of file cadstar_archive_parser.cpp.

720{
721 wxASSERT( aNode->GetName() == wxT( "GRIDS" ) );
722
723 XNODE* cNode = aNode->GetChildren();
724
725 for( ; cNode; cNode = cNode->GetNext() )
726 {
727 wxString cNodeName = cNode->GetName();
728
729 if( cNodeName == wxT( "WORKINGGRID" ) )
730 {
731 XNODE* workingGridNode = cNode->GetChildren();
732
733 if( !GRID::IsGrid( workingGridNode ) )
734 {
736 workingGridNode->GetName(), wxT( "GRIDS -> WORKINGGRID" ) );
737 }
738 else
739 {
740 WorkingGrid.Parse( workingGridNode, aContext );
741 }
742 }
743 else if( cNodeName == wxT( "SCREENGRID" ) )
744 {
745 XNODE* screenGridNode = cNode->GetChildren();
746
747 if( !GRID::IsGrid( screenGridNode ) )
748 {
750 screenGridNode->GetName(), wxT( "GRIDS -> SCREENGRID" ) );
751 }
752 else
753 {
754 ScreenGrid.Parse( screenGridNode, aContext );
755 }
756 }
757 else if( GRID::IsGrid( cNode ) )
758 {
759 GRID userGrid;
760 userGrid.Parse( cNode, aContext );
761 UserGrids.push_back( userGrid );
762 }
763 }
764}
#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
GRID ScreenGrid
From CADSTAR Help: "There is one Screen Grid, which is visible as dots on the screen.
std::vector< GRID > UserGrids
List of predefined grids created by the user.
static bool IsGrid(XNODE *aNode)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GRID::IsGrid(), CADSTAR_ARCHIVE_PARSER::GRID::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

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

Member Data Documentation

◆ ScreenGrid

GRID CADSTAR_ARCHIVE_PARSER::GRIDS::ScreenGrid

From CADSTAR Help: "There is one Screen Grid, which is visible as dots on the screen.

You cannot specify your own name for the Screen Grid. The visibility and colour of the dots representing the Screen Grid is set up by the Highlight category on the Colours dialog.

The type of Screen grid displayed(Lined or Points) is set up on the Display dialog within Options(File menu)."

Definition at line 546 of file cadstar_archive_parser.h.

◆ UserGrids

std::vector<GRID> CADSTAR_ARCHIVE_PARSER::GRIDS::UserGrids

List of predefined grids created by the user.

Definition at line 554 of file cadstar_archive_parser.h.

◆ WorkingGrid

GRID CADSTAR_ARCHIVE_PARSER::GRIDS::WorkingGrid

Definition at line 545 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().


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