KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO_BRD_STREAM_PARSER Class Reference
Inheritance diagram for ALLEGRO_BRD_STREAM_PARSER:
STREAM_PARSER BOARD_PARSER

Public Member Functions

void PrepareStream (std::istream &aStream) override
 Take some input stream and prepare it for parsing.
 
std::unique_ptr< BOARD_ITEMParse () override
 Actually perform the parsing and return a BOARD_ITEM if successful, or nullptr if not.
 

Private Attributes

std::vector< uint8_t > m_buffer
 

Detailed Description

Definition at line 126 of file pcb_parser_tool.cpp.

Member Function Documentation

◆ Parse()

std::unique_ptr< BOARD_ITEM > ALLEGRO_BRD_STREAM_PARSER::Parse ( )
inlineoverridevirtual

Actually perform the parsing and return a BOARD_ITEM if successful, or nullptr if not.

Exceptions
IO_ERRORif there is a parse failure

Implements BOARD_PARSER.

Definition at line 142 of file pcb_parser_tool.cpp.

References PCB_IO_ALLEGRO::LoadBoardFromData(), and m_buffer.

◆ PrepareStream()

void ALLEGRO_BRD_STREAM_PARSER::PrepareStream ( std::istream & aStream)
inlineoverridevirtual

Take some input stream and prepare it for parsing.

This may involve reading the whole stream into memory, or it may involve setting up some kind of streaming reader.

Exceptions
IO_ERRORif there is a problem setting up from the stream

Implements STREAM_PARSER.

Definition at line 129 of file pcb_parser_tool.cpp.

References _, m_buffer, and THROW_IO_ERROR.

Member Data Documentation

◆ m_buffer

std::vector<uint8_t> ALLEGRO_BRD_STREAM_PARSER::m_buffer
private

Definition at line 156 of file pcb_parser_tool.cpp.

Referenced by Parse(), and PrepareStream().


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