|
KiCad PCB EDA Suite
|
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_DB > | Parse () |
Private Member Functions | |
| void | readObjects (BRD_DB &aDb) |
Private Attributes | |
| FILE_STREAM & | m_stream |
| bool | m_endAtUnknownBlock = false |
| PROGRESS_REPORTER * | m_progressReporter = nullptr |
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.
|
inline |
Definition at line 121 of file allegro_parser.h.
References m_progressReporter, and m_stream.
|
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().
| std::unique_ptr< BRD_DB > ALLEGRO::PARSER::Parse | ( | ) |
Definition at line 2610 of file allegro_parser.cpp.
References _, dumpLL(), ALLEGRO::HEADER_PARSER::GetFormatVersion(), m_progressReporter, m_stream, PROF_TIMER::msecs(), ALLEGRO::HEADER_PARSER::ParseHeader(), readObjects(), ReadStringMap(), THROW_IO_ERROR, traceAllegroParser, traceAllegroPerf, ALLEGRO::V_PRE_V16, and IO_ERROR::What().
Referenced by PCB_IO_ALLEGRO::LoadBoard().
|
private |
Definition at line 2458 of file allegro_parser.cpp.
References _, ALLEGRO::DB::GetObjectCount(), ALLEGRO::BRD_DB::InsertBlock(), m_endAtUnknownBlock, ALLEGRO::BRD_DB::m_FmtVer, ALLEGRO::BRD_DB::m_Header, m_progressReporter, m_stream, ALLEGRO::BLOCK_PARSER::ParseBlock(), THROW_IO_ERROR, traceAllegroParser, traceAllegroParserBlocks, and ALLEGRO::V_180.
Referenced by Parse().
|
private |
Definition at line 147 of file allegro_parser.h.
Referenced by EndAtUnknownBlock(), and readObjects().
|
private |
Definition at line 148 of file allegro_parser.h.
Referenced by Parse(), PARSER(), and readObjects().
|
private |
Definition at line 145 of file allegro_parser.h.
Referenced by Parse(), PARSER(), and readObjects().