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 518 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 623 of file cadstar_archive_parser.cpp.

624 {
625  wxASSERT( aNode->GetName() == wxT( "GRIDS" ) );
626 
627  XNODE* cNode = aNode->GetChildren();
628 
629  for( ; cNode; cNode = cNode->GetNext() )
630  {
631  wxString cNodeName = cNode->GetName();
632 
633  if( cNodeName == wxT( "WORKINGGRID" ) )
634  {
635  XNODE* workingGridNode = cNode->GetChildren();
636 
637  if( !GRID::IsGrid( workingGridNode ) )
638  {
640  workingGridNode->GetName(), wxT( "GRIDS -> WORKINGGRID" ) );
641  }
642  else
643  {
644  WorkingGrid.Parse( workingGridNode, aContext );
645  }
646  }
647  else if( cNodeName == wxT( "SCREENGRID" ) )
648  {
649  XNODE* screenGridNode = cNode->GetChildren();
650 
651  if( !GRID::IsGrid( screenGridNode ) )
652  {
654  screenGridNode->GetName(), wxT( "GRIDS -> SCREENGRID" ) );
655  }
656  else
657  {
658  ScreenGrid.Parse( screenGridNode, aContext );
659  }
660  }
661  else if( GRID::IsGrid( cNode ) )
662  {
663  GRID userGrid;
664  userGrid.Parse( cNode, aContext );
665  UserGrids.push_back( userGrid );
666  }
667  }
668 }
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 521 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 529 of file cadstar_archive_parser.h.

◆ WorkingGrid

GRID CADSTAR_ARCHIVE_PARSER::GRIDS::WorkingGrid

Definition at line 520 of file cadstar_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::Load().


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