|
KiCad PCB EDA Suite
|
The block parser is responsible for parsing individual blocks of data from the file stream. More...
#include <allegro_parser.h>
Public Member Functions | |
| BLOCK_PARSER (FILE_STREAM &aStream, FMT_VER aVer, size_t aX27End=0) | |
| std::unique_ptr< BLOCK_BASE > | ParseBlock (bool &aEndOfObjectsMarker) |
| Parse one block from the stream, returning a BLOCK_BASE representing the raw data of the block. | |
Private Attributes | |
| FILE_STREAM & | m_stream |
| const FMT_VER | m_ver |
| const size_t | m_x27_end |
| To parse an 0x27 block, we need to know where the end of the block is in the stream. | |
The block parser is responsible for parsing individual blocks of data from the file stream.
Most blocks don't need much context to parse in a binary sense, but most need to know the version, and one (0x27) needs to know where the end of the block is.
Definition at line 79 of file allegro_parser.h.
|
inline |
Definition at line 82 of file allegro_parser.h.
| std::unique_ptr< BLOCK_BASE > ALLEGRO::BLOCK_PARSER::ParseBlock | ( | bool & | aEndOfObjectsMarker | ) |
Parse one block from the stream, returning a BLOCK_BASE representing the raw data of the block.
| aStream | The stream to read from, positioned at the start of the block (i.e. the next byte to read is the block type). |
| aEndOfObjectsMarker | This is set to true if we encounter the end of objects marker. |
Definition at line 2164 of file allegro_parser.cpp.
References m_stream, m_ver, m_x27_end, ParseBlock_0x01_ARC(), ParseBlock_0x03(), ParseBlock_0x04_NET_ASSIGNMENT(), ParseBlock_0x05_TRACK(), ParseBlock_0x06(), ParseBlock_0x07(), ParseBlock_0x08(), ParseBlock_0x09(), ParseBlock_0x0A_DRC(), ParseBlock_0x0C(), ParseBlock_0x0D_PAD(), ParseBlock_0x0E(), ParseBlock_0x0F(), ParseBlock_0x10(), ParseBlock_0x11(), ParseBlock_0x12(), ParseBlock_0x14(), ParseBlock_0x15_16_17_SEGMENT(), ParseBlock_0x1B_NET(), ParseBlock_0x1C_PADSTACK(), ParseBlock_0x1D(), ParseBlock_0x1E(), ParseBlock_0x1F(), ParseBlock_0x20(), ParseBlock_0x21(), ParseBlock_0x22(), ParseBlock_0x23_RATLINE(), ParseBlock_0x24_RECT(), ParseBlock_0x26(), ParseBlock_0x27(), ParseBlock_0x28_SHAPE(), ParseBlock_0x29_PIN(), ParseBlock_0x2A(), ParseBlock_0x2B(), ParseBlock_0x2C_TABLE(), ParseBlock_0x2D(), ParseBlock_0x2E(), ParseBlock_0x2F(), ParseBlock_0x30_STR_WRAPPER(), ParseBlock_0x31_SGRAPHIC(), ParseBlock_0x32_PLACED_PAD(), ParseBlock_0x33_VIA(), ParseBlock_0x34_KEEPOUT(), ParseBlock_0x35(), ParseBlock_0x36(), ParseBlock_0x37(), ParseBlock_0x38_FILM(), ParseBlock_0x39_FILM_LAYER_LIST(), ParseBlock_0x3A_FILM_LIST_NODE(), ParseBlock_0x3B(), ParseBlock_0x3C(), and THROW_IO_ERROR.
Referenced by ALLEGRO::PARSER::readObjects(), and ALLEGRO_BLOCK_TEST_FIXTURE::RunBlockTest().
|
private |
Definition at line 99 of file allegro_parser.h.
Referenced by BLOCK_PARSER(), and ParseBlock().
|
private |
Definition at line 100 of file allegro_parser.h.
Referenced by BLOCK_PARSER(), and ParseBlock().
|
private |
To parse an 0x27 block, we need to know where the end of the block is in the stream.
In a .brd file, this is in the header.
Definition at line 106 of file allegro_parser.h.
Referenced by BLOCK_PARSER(), and ParseBlock().