![]() |
KiCad PCB EDA Suite
|
#include <altium_parser.h>
Public Member Functions | |
ALTIUM_PARSER (const CFB::CompoundFileReader &aReader, const CFB::COMPOUND_FILE_ENTRY *aEntry) | |
ALTIUM_PARSER (std::unique_ptr< char[]> &aContent, size_t aSize) | |
~ALTIUM_PARSER ()=default | |
template<typename Type > | |
Type | Read () |
wxString | ReadWxString () |
std::vector< char > | ReadVector (size_t aSize) |
int32_t | ReadKicadUnit () |
int32_t | ReadKicadUnitX () |
int32_t | ReadKicadUnitY () |
wxPoint | ReadWxPoint () |
wxSize | ReadWxSize () |
size_t | ReadAndSetSubrecordLength () |
std::map< wxString, wxString > | ReadProperties () |
void | Skip (size_t aLength) |
void | SkipSubrecord () |
size_t | GetRemainingBytes () const |
size_t | GetRemainingSubrecordBytes () const |
bool | HasParsingError () |
Static Public Member Functions | |
static int32_t | ConvertToKicadUnit (const double aValue) |
static int | PropertiesReadInt (const std::map< wxString, wxString > &aProperties, const wxString &aKey, int aDefault) |
static double | PropertiesReadDouble (const std::map< wxString, wxString > &aProperties, const wxString &aKey, double aDefault) |
static bool | PropertiesReadBool (const std::map< wxString, wxString > &aProperties, const wxString &aKey, bool aDefault) |
static int32_t | PropertiesReadKicadUnit (const std::map< wxString, wxString > &aProperties, const wxString &aKey, const wxString &aDefault) |
static wxString | PropertiesReadString (const std::map< wxString, wxString > &aProperties, const wxString &aKey, const wxString &aDefault) |
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 47 of file altium_parser.h.
ALTIUM_PARSER::ALTIUM_PARSER | ( | const CFB::CompoundFileReader & | aReader, |
const CFB::COMPOUND_FILE_ENTRY * | aEntry | ||
) |
Definition at line 66 of file altium_parser.cpp.
References m_content, m_error, m_pos, m_size, and m_subrecord_end.
ALTIUM_PARSER::ALTIUM_PARSER | ( | std::unique_ptr< char[]> & | aContent, |
size_t | aSize | ||
) |
Definition at line 80 of file altium_parser.cpp.
References m_content, m_error, m_pos, m_size, and m_subrecord_end.
|
default |
|
inlinestatic |
Definition at line 141 of file altium_parser.h.
References KiROUND().
Referenced by AREGION6::AREGION6(), BOOST_AUTO_TEST_CASE(), PropertiesReadKicadUnit(), and ReadKicadUnit().
|
inline |
Definition at line 201 of file altium_parser.h.
References m_content, m_pos, and m_size.
Referenced by ALTIUM_PCB::ParseArcs6Data(), ALTIUM_PCB::ParseBoard6Data(), ALTIUM_PCB::ParseBoardRegionsData(), ALTIUM_PCB::ParseClasses6Data(), ALTIUM_PCB::ParseComponents6Data(), ALTIUM_PCB::ParseComponentsBodies6Data(), ALTIUM_PCB::ParseDimensions6Data(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), ALTIUM_PCB::ParseFills6Data(), ALTIUM_PCB::ParseModelsData(), ALTIUM_PCB::ParseNets6Data(), ALTIUM_PCB::ParsePads6Data(), ALTIUM_PCB::ParsePolygons6Data(), ALTIUM_PCB::ParseRegions6Data(), ALTIUM_PCB::ParseRules6Data(), ALTIUM_PCB::ParseShapeBasedRegions6Data(), SCH_ALTIUM_PLUGIN::ParseStorage(), ALTIUM_PCB::ParseTexts6Data(), ALTIUM_PCB::ParseTracks6Data(), ALTIUM_PCB::ParseVias6Data(), Read(), ReadProperties(), ReadVector(), ReadWxString(), and Skip().
|
inline |
Definition at line 206 of file altium_parser.h.
References m_pos, and m_subrecord_end.
Referenced by APAD6::APAD6().
|
inline |
Definition at line 213 of file altium_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_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), and SCH_ALTIUM_PLUGIN::ParseStorage().
|
static |
Definition at line 177 of file altium_parser.cpp.
Referenced by ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AMODEL::AMODEL(), APOLYGON6::APOLYGON6(), AREGION6::AREGION6(), ASCH_COMPONENT::ASCH_COMPONENT(), ASCH_FILE_NAME::ASCH_FILE_NAME(), ASCH_IMAGE::ASCH_IMAGE(), ASCH_LABEL::ASCH_LABEL(), ASCH_NO_ERC::ASCH_NO_ERC(), ASCH_PARAMETER::ASCH_PARAMETER(), ASCH_POLYGON::ASCH_POLYGON(), ASCH_POWER_PORT::ASCH_POWER_PORT(), ASCH_RECTANGLE::ASCH_RECTANGLE(), ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE(), ASCH_SHEET_FONT::ASCH_SHEET_FONT(), ASCH_SHEET_NAME::ASCH_SHEET_NAME(), and ASCH_SHEET_SYMBOL::ASCH_SHEET_SYMBOL().
|
static |
Definition at line 159 of file altium_parser.cpp.
Referenced by ABOARD6::ABOARD6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), altium_parse_polygons(), AMODEL::AMODEL(), and ASCH_ARC::ASCH_ARC().
|
static |
Definition at line 152 of file altium_parser.cpp.
Referenced by ABOARD6::ABOARD6(), ACLASS6::ACLASS6(), ACOMPONENT6::ACOMPONENT6(), ADIMENSION6::ADIMENSION6(), altium_parse_polygons(), APOLYGON6::APOLYGON6(), AREGION6::AREGION6(), ARULE6::ARULE6(), ASCH_ARC::ASCH_ARC(), ASCH_BEZIER::ASCH_BEZIER(), ASCH_BUS::ASCH_BUS(), ASCH_COMPONENT::ASCH_COMPONENT(), ASCH_DESIGNATOR::ASCH_DESIGNATOR(), ASCH_FILE_NAME::ASCH_FILE_NAME(), ASCH_IMAGE::ASCH_IMAGE(), ASCH_JUNCTION::ASCH_JUNCTION(), ASCH_LABEL::ASCH_LABEL(), ASCH_LINE::ASCH_LINE(), ASCH_NO_ERC::ASCH_NO_ERC(), ASCH_PARAMETER::ASCH_PARAMETER(), ASCH_PIN::ASCH_PIN(), ASCH_POLYGON::ASCH_POLYGON(), ASCH_POLYLINE::ASCH_POLYLINE(), ASCH_PORT::ASCH_PORT(), ASCH_POWER_PORT::ASCH_POWER_PORT(), ASCH_RECTANGLE::ASCH_RECTANGLE(), ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE(), ASCH_SHEET::ASCH_SHEET(), ASCH_SHEET_ENTRY::ASCH_SHEET_ENTRY(), ASCH_SHEET_FONT::ASCH_SHEET_FONT(), ASCH_SHEET_NAME::ASCH_SHEET_NAME(), ASCH_SHEET_SYMBOL::ASCH_SHEET_SYMBOL(), ASCH_WIRE::ASCH_WIRE(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), SCH_ALTIUM_PLUGIN::ParseStorage(), PropertiesReadEnum(), PropertiesReadKiCadUnitFrac(), PropertiesReadKiCadUnitFrac1(), and PropertiesReadRecord().
|
static |
Definition at line 187 of file altium_parser.cpp.
References ConvertToKicadUnit(), Format(), and PropertiesReadString().
Referenced by ABOARD6::ABOARD6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), altium_parse_polygons(), APOLYGON6::APOLYGON6(), ARULE6::ARULE6(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 209 of file altium_parser.cpp.
Referenced by ABOARD6::ABOARD6(), ACLASS6::ACLASS6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AMODEL::AMODEL(), ANET6::ANET6(), APOLYGON6::APOLYGON6(), ARULE6::ARULE6(), ASCH_COMPONENT::ASCH_COMPONENT(), ASCH_DESIGNATOR::ASCH_DESIGNATOR(), ASCH_FILE_NAME::ASCH_FILE_NAME(), ASCH_IMAGE::ASCH_IMAGE(), ASCH_LABEL::ASCH_LABEL(), ASCH_NET_LABEL::ASCH_NET_LABEL(), ASCH_PARAMETER::ASCH_PARAMETER(), ASCH_PIN::ASCH_PIN(), ASCH_PORT::ASCH_PORT(), ASCH_POWER_PORT::ASCH_POWER_PORT(), ASCH_SHEET_ENTRY::ASCH_SHEET_ENTRY(), ASCH_SHEET_FONT::ASCH_SHEET_FONT(), ASCH_SHEET_NAME::ASCH_SHEET_NAME(), SCH_ALTIUM_PLUGIN::ParseStorage(), and PropertiesReadKicadUnit().
|
inline |
Definition at line 55 of file altium_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by AARC6::AARC6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), AFILL6::AFILL6(), APAD6::APAD6(), AREGION6::AREGION6(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), and AVIA6::AVIA6().
|
inline |
Definition at line 132 of file altium_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(), and ALTIUM_PCB::ParseFileHeader().
|
inline |
Definition at line 103 of file altium_parser.h.
References ConvertToKicadUnit().
Referenced by AARC6::AARC6(), APAD6::APAD6(), AREGION6::AREGION6(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), AVIA6::AVIA6(), ReadKicadUnitX(), ReadKicadUnitY(), and ReadWxSize().
|
inline |
Definition at line 108 of file altium_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6(), and ReadWxPoint().
|
inline |
Definition at line 113 of file altium_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6(), and ReadWxPoint().
std::map< wxString, wxString > ALTIUM_PARSER::ReadProperties | ( | ) |
Definition at line 90 of file altium_parser.cpp.
References GetRemainingBytes(), kv, m_error, and m_pos.
Referenced by ABOARD6::ABOARD6(), ACLASS6::ACLASS6(), ACOMPONENT6::ACOMPONENT6(), ACOMPONENTBODY6::ACOMPONENTBODY6(), ADIMENSION6::ADIMENSION6(), AMODEL::AMODEL(), ANET6::ANET6(), APOLYGON6::APOLYGON6(), AREGION6::AREGION6(), ARULE6::ARULE6(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), and SCH_ALTIUM_PLUGIN::ParseStorage().
|
inline |
Definition at line 88 of file altium_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by ASCH_STORAGE_FILE::ASCH_STORAGE_FILE().
|
inline |
Definition at line 118 of file altium_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 125 of file altium_parser.h.
References ReadKicadUnit().
Referenced by APAD6::APAD6().
|
inline |
Definition at line 70 of file altium_parser.h.
References GetRemainingBytes(), m_error, and m_pos.
Referenced by APAD6::APAD6(), ASCH_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), and ALTIUM_PCB::ParseFileHeader().
|
inline |
Definition at line 177 of file altium_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_STORAGE_FILE::ASCH_STORAGE_FILE(), ATEXT6::ATEXT6(), ATRACK6::ATRACK6(), and AVIA6::AVIA6().
|
inline |
Definition at line 189 of file altium_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(), and ALTIUM_PCB::ParseTracks6Data().
|
private |
Definition at line 219 of file altium_parser.h.
Referenced by ALTIUM_PARSER(), and GetRemainingBytes().
|
private |
Definition at line 224 of file altium_parser.h.
Referenced by ALTIUM_PARSER(), HasParsingError(), Read(), ReadProperties(), ReadVector(), ReadWxString(), Skip(), and SkipSubrecord().
|
private |
Definition at line 222 of file altium_parser.h.
Referenced by ALTIUM_PARSER(), GetRemainingBytes(), GetRemainingSubrecordBytes(), Read(), ReadAndSetSubrecordLength(), ReadProperties(), ReadVector(), ReadWxString(), Skip(), and SkipSubrecord().
|
private |
Definition at line 220 of file altium_parser.h.
Referenced by ALTIUM_PARSER(), and GetRemainingBytes().
|
private |
Definition at line 223 of file altium_parser.h.
Referenced by ALTIUM_PARSER(), GetRemainingSubrecordBytes(), ReadAndSetSubrecordLength(), and SkipSubrecord().