KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALTIUM_BINARY_PARSER Class Reference

#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
 

Detailed Description

Definition at line 111 of file altium_binary_parser.h.

Constructor & Destructor Documentation

◆ ALTIUM_BINARY_PARSER() [1/2]

ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER ( const ALTIUM_COMPOUND_FILE aFile,
const CFB::COMPOUND_FILE_ENTRY *  aEntry 
)

◆ ALTIUM_BINARY_PARSER() [2/2]

ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER ( std::unique_ptr< char[]> &  aContent,
size_t  aSize 
)

Definition at line 387 of file altium_binary_parser.cpp.

References m_content, m_error, m_pos, m_size, and m_subrecord_end.

◆ ~ALTIUM_BINARY_PARSER()

ALTIUM_BINARY_PARSER::~ALTIUM_BINARY_PARSER ( )
default

Member Function Documentation

◆ GetRemainingBytes()

◆ GetRemainingSubrecordBytes()

size_t ALTIUM_BINARY_PARSER::GetRemainingSubrecordBytes ( ) const
inline

Definition at line 305 of file altium_binary_parser.h.

References m_pos, and m_subrecord_end.

Referenced by AARC6::AARC6(), AFILL6::AFILL6(), APAD6::APAD6(), and ATRACK6::ATRACK6().

◆ HasParsingError()

◆ Peek()

template<typename Type >
Type ALTIUM_BINARY_PARSER::Peek ( )
inline

Definition at line 137 of file altium_binary_parser.h.

References m_error, and m_pos.

Referenced by ALTIUM_PCB::ParseFootprint().

◆ Read()

◆ ReadAndSetSubrecordLength()

◆ ReadBytes()

int ALTIUM_BINARY_PARSER::ReadBytes ( char *  aOut,
size_t  aSize 
)
inline

Definition at line 218 of file altium_binary_parser.h.

References GetRemainingBytes(), m_error, and m_pos.

Referenced by ATEXT6::ATEXT6().

◆ ReadCharBuffer()

wxScopedCharBuffer ALTIUM_BINARY_PARSER::ReadCharBuffer ( )
inline

◆ ReadKicadUnit()

◆ ReadKicadUnitX()

int32_t ALTIUM_BINARY_PARSER::ReadKicadUnitX ( )
inline

Definition at line 238 of file altium_binary_parser.h.

References ReadKicadUnit().

Referenced by APAD6::APAD6(), and ReadVector2IPos().

◆ ReadKicadUnitY()

int32_t ALTIUM_BINARY_PARSER::ReadKicadUnitY ( )
inline

Definition at line 243 of file altium_binary_parser.h.

References ReadKicadUnit().

Referenced by APAD6::APAD6(), and ReadVector2IPos().

◆ ReadProperties()

◆ ReadVector()

std::vector< char > ALTIUM_BINARY_PARSER::ReadVector ( size_t  aSize)
inline

◆ ReadVector2IPos()

VECTOR2I ALTIUM_BINARY_PARSER::ReadVector2IPos ( )
inline

◆ ReadVector2ISize()

VECTOR2I ALTIUM_BINARY_PARSER::ReadVector2ISize ( )
inline

Definition at line 255 of file altium_binary_parser.h.

References ReadKicadUnit().

Referenced by APAD6::APAD6().

◆ ReadWideStringTable()

std::map< uint32_t, wxString > ALTIUM_BINARY_PARSER::ReadWideStringTable ( )
inline

Definition at line 173 of file altium_binary_parser.h.

References GetRemainingBytes(), and m_pos.

Referenced by ALTIUM_PCB::ParseWideStrings6Data().

◆ ReadWxString()

wxString ALTIUM_BINARY_PARSER::ReadWxString ( )
inline

◆ Skip()

◆ SkipSubrecord()

Member Data Documentation

◆ m_content

std::unique_ptr<char[]> ALTIUM_BINARY_PARSER::m_content
private

Definition at line 318 of file altium_binary_parser.h.

Referenced by ALTIUM_BINARY_PARSER(), and GetRemainingBytes().

◆ m_error

bool ALTIUM_BINARY_PARSER::m_error
private

◆ m_pos

◆ m_size

size_t ALTIUM_BINARY_PARSER::m_size
private

Definition at line 319 of file altium_binary_parser.h.

Referenced by ALTIUM_BINARY_PARSER(), and GetRemainingBytes().

◆ m_subrecord_end

char* ALTIUM_BINARY_PARSER::m_subrecord_end
private

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