KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO::PARSER Class Reference

Class that parses a single FILE_STREAM into a RAW_BOARD, and handles any state involved in that parsing. More...

#include <allegro_parser.h>

Public Member Functions

 PARSER (FILE_STREAM &aStream, PROGRESS_REPORTER *aProgressReporter)
 
void EndAtUnknownBlock (bool aEndAtUnknownBlock)
 When set to true, the parser will stop at the first unknown block, rather than throwing an error.
 
std::unique_ptr< BRD_DBParse ()
 

Private Member Functions

void readObjects (BRD_DB &aDb)
 

Private Attributes

FILE_STREAMm_stream
 
bool m_endAtUnknownBlock = false
 
PROGRESS_REPORTERm_progressReporter = nullptr
 

Detailed Description

Class that parses a single FILE_STREAM into a RAW_BOARD, and handles any state involved in that parsing.

This only handles converting rawfile stream data into structs that represent a near-verbatim representation of the data, with a few small conversions and conveniences.

Definition at line 118 of file allegro_parser.h.

Constructor & Destructor Documentation

◆ PARSER()

ALLEGRO::PARSER::PARSER ( FILE_STREAM & aStream,
PROGRESS_REPORTER * aProgressReporter )
inline

Definition at line 121 of file allegro_parser.h.

References m_progressReporter, and m_stream.

Member Function Documentation

◆ EndAtUnknownBlock()

void ALLEGRO::PARSER::EndAtUnknownBlock ( bool aEndAtUnknownBlock)
inline

When set to true, the parser will stop at the first unknown block, rather than throwing an error.

This is mostly useful for debugging, as at least you can dump the blocks and see what they are. But in real life, this would result in a very incomplete board state.

Definition at line 135 of file allegro_parser.h.

References m_endAtUnknownBlock.

Referenced by PCB_IO_ALLEGRO::LoadBoard().

◆ Parse()

◆ readObjects()

Member Data Documentation

◆ m_endAtUnknownBlock

bool ALLEGRO::PARSER::m_endAtUnknownBlock = false
private

Definition at line 147 of file allegro_parser.h.

Referenced by EndAtUnknownBlock(), and readObjects().

◆ m_progressReporter

PROGRESS_REPORTER* ALLEGRO::PARSER::m_progressReporter = nullptr
private

Definition at line 148 of file allegro_parser.h.

Referenced by Parse(), PARSER(), and readObjects().

◆ m_stream

FILE_STREAM& ALLEGRO::PARSER::m_stream
private

Definition at line 145 of file allegro_parser.h.

Referenced by Parse(), PARSER(), and readObjects().


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