KiCad PCB EDA Suite
|
#include <altium_binary_parser.h>
Public Member Functions | |
ALTIUM_BINARY_PARSER (const ALTIUM_COMPOUND_FILE &aFile, const CFB::COMPOUND_FILE_ENTRY *aEntry) | |
ALTIUM_BINARY_PARSER (std::unique_ptr< char[]> &aContent, size_t aSize) | |
~ALTIUM_BINARY_PARSER ()=default | |
template<typename Type > | |
Type | Read () |
template<typename Type > | |
Type | Peek () |
wxScopedCharBuffer | ReadCharBuffer () |
wxString | ReadWxString () |
std::map< uint32_t, wxString > | ReadWideStringTable () |
std::vector< char > | ReadVector (size_t aSize) |
int | ReadBytes (char *aOut, size_t aSize) |
int32_t | ReadKicadUnit () |
int32_t | ReadKicadUnitX () |
int32_t | ReadKicadUnitY () |
VECTOR2I | ReadVector2IPos () |
VECTOR2I | ReadVector2ISize () |
size_t | ReadAndSetSubrecordLength () |
std::map< wxString, wxString > | ReadProperties (std::function< std::map< wxString, wxString >(const std::string &)> handleBinaryData=[](const std::string &) { return std::map< wxString, wxString >();}) |
void | Skip (size_t aLength) |
void | SkipSubrecord () |
size_t | GetRemainingBytes () const |
size_t | GetRemainingSubrecordBytes () const |
bool | HasParsingError () |
Private Attributes | |
std::unique_ptr< char[]> | m_content |
size_t | m_size |
char * | m_pos |
char * | m_subrecord_end |
bool | m_error |
Definition at line 116 of file altium_binary_parser.h.
ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER | ( | const ALTIUM_COMPOUND_FILE & | aFile, |
const CFB::COMPOUND_FILE_ENTRY * | aEntry | ||
) |
Definition at line 312 of file altium_binary_parser.cpp.
References ALTIUM_COMPOUND_FILE::GetCompoundFileReader(), m_content, m_error, m_pos, m_size, and m_subrecord_end.
ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER | ( | std::unique_ptr< char[]> & | aContent, |
size_t | aSize | ||
) |
Definition at line 326 of file altium_binary_parser.cpp.
References m_content, m_error, m_pos, m_size, and m_subrecord_end.
|
default |
|
inline |
Definition at line 305 of file altium_binary_parser.h.
References m_content, m_pos, and m_size.
Referenced by BOOST_DATA_TEST_CASE(), ALTIUM_PCB_COMPOUND_FILE::CacheLibModels(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), ALTIUM_PCB::Parse(), SCH_IO_ALTIUM::ParseAdditional(), ALTIUM_PCB::ParseArcs6Data(), ALTIUM_PCB::ParseBoard6Data(), ALTIUM_PCB::ParseBoardRegionsData(), ALTIUM_PCB::ParseClasses6Data(), ALTIUM_PCB::ParseComponents6Data(), ALTIUM_PCB::ParseComponentsBodies6Data(), ALTIUM_PCB::ParseDimensions6Data(), ALTIUM_PCB::ParseExtendedPrimitiveInformationData(), SCH_IO_ALTIUM::ParseFileHeader(), ALTIUM_PCB::ParseFills6Data(), ALTIUM_PCB::ParseFootprint(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLibHeader(), ALTIUM_PCB::ParseModelsData(), ALTIUM_PCB::ParseNets6Data(), ALTIUM_PCB::ParsePads6Data(), ALTIUM_PCB::ParsePolygons6Data(), ALTIUM_PCB::ParseRegions6Data(), ALTIUM_PCB::ParseRules6Data(), ALTIUM_PCB::ParseShapeBasedRegions6Data(), SCH_IO_ALTIUM::ParseStorage(), ALTIUM_PCB::ParseTexts6Data(), ALTIUM_PCB::ParseTracks6Data(), ALTIUM_PCB::ParseVias6Data(), ALTIUM_PCB::ParseWideStrings6Data(), Read(), ReadBytes(), ReadCharBuffer(), ReadProperties(), ReadVector(), ReadWideStringTable(), and Skip().
|
inline |
Definition at line 310 of file altium_binary_parser.h.
References m_pos, and m_subrecord_end.
Referenced by AARC6::AARC6(), AFILL6::AFILL6(), APAD6::APAD6(), ATEXT6::ATEXT6(), and ATRACK6::ATRACK6().
|
inline |
Definition at line 317 of file altium_binary_parser.h.
References m_error.
Referenced by AARC6::AARC6(), ABOARD6::ABOARD6(), ACLASS6::ACLASS6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AFILL6::AFILL6(), AMODEL::AMODEL(), ANET6::ANET6(), APAD6::APAD6(), APOLYGON6::APOLYGON6(), AREGION6::AREGION6(), ARULE6::ARULE6(), ASCH_ADDITIONAL_FILE::ASCH_ADDITIONAL_FILE(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), BOOST_DATA_TEST_CASE(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), ALTIUM_PCB::Parse(), SCH_IO_ALTIUM::ParseAdditional(), SCH_IO_ALTIUM::ParseFileHeader(), SCH_IO_ALTIUM::ParseLibFile(), and SCH_IO_ALTIUM::ParseStorage().
|
inline |
Definition at line 142 of file altium_binary_parser.h.
References m_error, and m_pos.
Referenced by ALTIUM_PCB::ParseFootprint().
|
inline |
Definition at line 124 of file altium_binary_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by AARC6::AARC6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ASCH_ADDITIONAL_FILE::ASCH_ADDITIONAL_FILE(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), and ALTIUM_PCB::Parse().
|
inline |
Definition at line 267 of file altium_binary_parser.h.
References m_pos, and m_subrecord_end.
Referenced by AARC6::AARC6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), ALTIUM_PCB::ParseFileHeader(), and ALTIUM_PCB::ParseFootprint().
|
inline |
Definition at line 223 of file altium_binary_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by ATEXT6::ATEXT6().
|
inline |
Definition at line 152 of file altium_binary_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), and ReadWxString().
|
inline |
Definition at line 238 of file altium_binary_parser.h.
References ALTIUM_PROPS_UTILS::ConvertToKicadUnit().
Referenced by AARC6::AARC6(), APAD6::APAD6(), AREGION6::AREGION6(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), ReadKicadUnitX(), ReadKicadUnitY(), and ReadVector2ISize().
|
inline |
Definition at line 243 of file altium_binary_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6(), and ReadVector2IPos().
|
inline |
Definition at line 248 of file altium_binary_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6(), and ReadVector2IPos().
std::map< wxString, wxString > ALTIUM_BINARY_PARSER::ReadProperties | ( | std::function< std::map< wxString, wxString >(const std::string &)> | handleBinaryData = []( const std::string& ) { return std::map<wxString, wxString>(); } | ) |
Definition at line 336 of file altium_binary_parser.cpp.
References AltiumPropertyToKiCadString(), GetRemainingBytes(), kv, m_error, and m_pos.
Referenced by ABOARD6::ABOARD6(), ACLASS6::ACLASS6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AEXTENDED_PRIMITIVE_INFORMATION::AEXTENDED_PRIMITIVE_INFORMATION(), AMODEL::AMODEL(), ANET6::ANET6(), APOLYGON6::APOLYGON6(), AREGION6::AREGION6(), ARULE6::ARULE6(), BOOST_DATA_TEST_CASE(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), SCH_IO_ALTIUM::ParseAdditional(), SCH_IO_ALTIUM::ParseFileHeader(), ALTIUM_PCB::ParseFootprint(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLibHeader(), and SCH_IO_ALTIUM::ParseStorage().
|
inline |
Definition at line 208 of file altium_binary_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by ASCH_ADDITIONAL_FILE::ASCH_ADDITIONAL_FILE(), and ASCH_STORAGE_FILE::ASCH_STORAGE_FILE().
|
inline |
Definition at line 253 of file altium_binary_parser.h.
References ReadKicadUnitX(), and ReadKicadUnitY().
Referenced by AARC6::AARC6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), and AVIA6::AVIA6().
|
inline |
Definition at line 260 of file altium_binary_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6().
|
inline |
Definition at line 178 of file altium_binary_parser.h.
References GetRemainingBytes(), and m_pos.
Referenced by ALTIUM_PCB::ParseWideStrings6Data().
|
inline |
Definition at line 171 of file altium_binary_parser.h.
References ReadCharBuffer().
Referenced by APAD6::APAD6(), ASCH_ADDITIONAL_FILE::ASCH_ADDITIONAL_FILE(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), and ALTIUM_PCB::ParseFileHeader().
|
inline |
Definition at line 281 of file altium_binary_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by AARC6::AARC6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ARULE6::ARULE6(), ASCH_ADDITIONAL_FILE::ASCH_ADDITIONAL_FILE(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), and AVIA6::AVIA6().
|
inline |
Definition at line 293 of file altium_binary_parser.h.
References m_error, m_pos, and m_subrecord_end.
Referenced by AARC6::AARC6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), PCB_IO_ALTIUM_DESIGNER::FootprintEnumerate(), and ALTIUM_PCB::ParseFootprint().
|
private |
Definition at line 323 of file altium_binary_parser.h.
Referenced by ALTIUM_BINARY_PARSER(), and GetRemainingBytes().
|
private |
Definition at line 328 of file altium_binary_parser.h.
Referenced by ALTIUM_BINARY_PARSER(), HasParsingError(), Peek(), Read(), ReadBytes(), ReadCharBuffer(), ReadProperties(), ReadVector(), Skip(), and SkipSubrecord().
|
private |
Definition at line 326 of file altium_binary_parser.h.
Referenced by ALTIUM_BINARY_PARSER(), GetRemainingBytes(), GetRemainingSubrecordBytes(), Peek(), Read(), ReadAndSetSubrecordLength(), ReadBytes(), ReadCharBuffer(), ReadProperties(), ReadVector(), ReadWideStringTable(), Skip(), and SkipSubrecord().
|
private |
Definition at line 324 of file altium_binary_parser.h.
Referenced by ALTIUM_BINARY_PARSER(), and GetRemainingBytes().
|
private |
Definition at line 327 of file altium_binary_parser.h.
Referenced by ALTIUM_BINARY_PARSER(), GetRemainingSubrecordBytes(), ReadAndSetSubrecordLength(), and SkipSubrecord().