|
KiCad PCB EDA Suite
|
Parses a .brd header, taking care of any version-specific differences. More...
#include <allegro_parser.h>
Public Member Functions | |
| HEADER_PARSER (FILE_STREAM &aStream) | |
| std::unique_ptr< FILE_HEADER > | ParseHeader () |
| FMT_VER | GetFormatVersion () const |
| Get the parsed format version. | |
Static Public Member Functions | |
| static FMT_VER | FormatFromMagic (uint32_t aMagic) |
| Determine the format version from the magic number. | |
Private Attributes | |
| FILE_STREAM & | m_stream |
| FMT_VER | m_fmtVer |
Parses a .brd header, taking care of any version-specific differences.
Encapsulates any state and context needed to parse the header.
Definition at line 44 of file allegro_parser.h.
|
inline |
Definition at line 47 of file allegro_parser.h.
References m_fmtVer, m_stream, and ALLEGRO::V_UNKNOWN.
|
static |
Determine the format version from the magic number.
Definition at line 153 of file allegro_parser.cpp.
References THROW_IO_ERROR, ALLEGRO::V_160, ALLEGRO::V_162, ALLEGRO::V_164, ALLEGRO::V_165, ALLEGRO::V_166, ALLEGRO::V_172, ALLEGRO::V_174, ALLEGRO::V_175, ALLEGRO::V_180, and ALLEGRO::V_PRE_V16.
Referenced by ParseHeader().
|
inline |
Get the parsed format version.
This is only valid after ParseHeader() has been called successfully.
Definition at line 60 of file allegro_parser.h.
References m_fmtVer.
Referenced by ALLEGRO::PARSER::Parse(), and ALLEGRO_BLOCK_TEST_FIXTURE::RunHeaderTest().
| std::unique_ptr< ALLEGRO::FILE_HEADER > HEADER_PARSER::ParseHeader | ( | ) |
Definition at line 189 of file allegro_parser.cpp.
References FormatFromMagic(), ALLEGRO::IMPERIAL, m_fmtVer, m_stream, ALLEGRO::METRIC, ReadArrayU32(), ReadCond(), ReadLL(), THROW_IO_ERROR, traceAllegroParser, and ALLEGRO::V_180.
Referenced by ALLEGRO::PARSER::Parse(), and ALLEGRO_BLOCK_TEST_FIXTURE::RunHeaderTest().
|
private |
Definition at line 69 of file allegro_parser.h.
Referenced by GetFormatVersion(), HEADER_PARSER(), and ParseHeader().
|
private |
Definition at line 68 of file allegro_parser.h.
Referenced by HEADER_PARSER(), and ParseHeader().