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 506 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 617 of file cadstar_archive_parser.cpp.

618 {
619  wxASSERT( aNode->GetName() == wxT( "GRIDS" ) );
620 
621  XNODE* cNode = aNode->GetChildren();
622 
623  for( ; cNode; cNode = cNode->GetNext() )
624  {
625  wxString cNodeName = cNode->GetName();
626 
627  if( cNodeName == wxT( "WORKINGGRID" ) )
628  {
629  XNODE* workingGridNode = cNode->GetChildren();
630 
631  if( !GRID::IsGrid( workingGridNode ) )
632  {
634  workingGridNode->GetName(), wxT( "GRIDS -> WORKINGGRID" ) );
635  }
636  else
637  {
638  WorkingGrid.Parse( workingGridNode, aContext );
639  }
640  }
641  else if( cNodeName == wxT( "SCREENGRID" ) )
642  {
643  XNODE* screenGridNode = cNode->GetChildren();
644 
645  if( !GRID::IsGrid( screenGridNode ) )
646  {
648  screenGridNode->GetName(), wxT( "GRIDS -> SCREENGRID" ) );
649  }
650  else
651  {
652  ScreenGrid.Parse( screenGridNode, aContext );
653  }
654  }
655  else if( GRID::IsGrid( cNode ) )
656  {
657  GRID userGrid;
658  userGrid.Parse( cNode, aContext );
659  UserGrids.push_back( userGrid );
660  }
661  }
662 }
GRID ScreenGrid
From CADSTAR Help: "There is one Screen Grid, which is visible as dots on the screen.
static bool IsGrid(XNODE *aNode)
std::vector< GRID > UserGrids
List of predefined grids created by the user.
XNODE * GetChildren() const
Definition: xnode.h:62
Hold an XML or S-expression element.
Definition: xnode.h:43
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References XNODE::GetChildren(), 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 509 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 517 of file cadstar_archive_parser.h.

◆ WorkingGrid

GRID CADSTAR_ARCHIVE_PARSER::GRIDS::WorkingGrid

Definition at line 508 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().


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