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

#include <altium_binary_parser.h>

Public Member Functions

 ALTIUM_COMPOUND_FILE (const wxString &aFilePath)
 Open a CFB file.
 
 ALTIUM_COMPOUND_FILE (const void *aBuffer, size_t aLen)
 Load a CFB file from memory.
 
 ALTIUM_COMPOUND_FILE (const ALTIUM_COMPOUND_FILE &temp_obj)=delete
 
ALTIUM_COMPOUND_FILEoperator= (const ALTIUM_COMPOUND_FILE &temp_obj)=delete
 
 ~ALTIUM_COMPOUND_FILE ()=default
 
const CFB::CompoundFileReader & GetCompoundFileReader () const
 
std::unique_ptr< ALTIUM_COMPOUND_FILEDecodeIntLibStream (const CFB::COMPOUND_FILE_ENTRY &cfe)
 
std::map< wxString, wxString > ListLibFootprints ()
 
std::tuple< wxString, const CFB::COMPOUND_FILE_ENTRY * > FindLibFootprintDirName (const wxString &aFpUnicodeName)
 
const CFB::COMPOUND_FILE_ENTRY * FindStream (const std::vector< std::string > &aStreamPath) const
 
const CFB::COMPOUND_FILE_ENTRY * FindStream (const CFB::COMPOUND_FILE_ENTRY *aStart, const std::vector< std::string > &aStreamPath) const
 
const CFB::COMPOUND_FILE_ENTRY * FindStreamSingleLevel (const CFB::COMPOUND_FILE_ENTRY *aEntry, const std::string aName, const bool aIsStream) const
 
std::map< wxString, const CFB::COMPOUND_FILE_ENTRY * > EnumDir (const std::wstring &aDir) const
 
std::map< wxString, const CFB::COMPOUND_FILE_ENTRY * > GetLibSymbols (const CFB::COMPOUND_FILE_ENTRY *aStart) const
 

Private Member Functions

void cacheLibFootprintNames ()
 

Private Attributes

std::unique_ptr< CFB::CompoundFileReader > m_reader
 
std::vector< char > m_buffer
 
std::map< wxString, const CFB::COMPOUND_FILE_ENTRY * > m_libFootprintNameCache
 
std::map< wxString, wxString > m_libFootprintDirNameCache
 

Detailed Description

Definition at line 56 of file altium_binary_parser.h.

Constructor & Destructor Documentation

◆ ALTIUM_COMPOUND_FILE() [1/3]

ALTIUM_COMPOUND_FILE::ALTIUM_COMPOUND_FILE ( const wxString &  aFilePath)

Open a CFB file.

Constructor might throw an IO_ERROR.

Parameters
aFilePathpath to file to open

Definition at line 49 of file altium_binary_parser.cpp.

References _, m_buffer, m_reader, and THROW_IO_ERROR.

◆ ALTIUM_COMPOUND_FILE() [2/3]

ALTIUM_COMPOUND_FILE::ALTIUM_COMPOUND_FILE ( const void *  aBuffer,
size_t  aLen 
)

Load a CFB file from memory.

Constructor might throw an IO_ERROR. Data is copied.

Parameters
aBufferdata buffer
aLendata length

Definition at line 92 of file altium_binary_parser.cpp.

References m_buffer, m_reader, and THROW_IO_ERROR.

◆ ALTIUM_COMPOUND_FILE() [3/3]

ALTIUM_COMPOUND_FILE::ALTIUM_COMPOUND_FILE ( const ALTIUM_COMPOUND_FILE temp_obj)
delete

◆ ~ALTIUM_COMPOUND_FILE()

ALTIUM_COMPOUND_FILE::~ALTIUM_COMPOUND_FILE ( )
default

Member Function Documentation

◆ cacheLibFootprintNames()

void ALTIUM_COMPOUND_FILE::cacheLibFootprintNames ( )
private

◆ DecodeIntLibStream()

std::unique_ptr< ALTIUM_COMPOUND_FILE > ALTIUM_COMPOUND_FILE::DecodeIntLibStream ( const CFB::COMPOUND_FILE_ENTRY &  cfe)

Definition at line 109 of file altium_binary_parser.cpp.

References GetCompoundFileReader().

◆ EnumDir()

std::map< wxString, const CFB::COMPOUND_FILE_ENTRY * > ALTIUM_COMPOUND_FILE::EnumDir ( const std::wstring &  aDir) const

Definition at line 243 of file altium_binary_parser.cpp.

References m_reader.

◆ FindLibFootprintDirName()

std::tuple< wxString, const CFB::COMPOUND_FILE_ENTRY * > ALTIUM_COMPOUND_FILE::FindLibFootprintDirName ( const wxString &  aFpUnicodeName)

◆ FindStream() [1/2]

const CFB::COMPOUND_FILE_ENTRY * ALTIUM_COMPOUND_FILE::FindStream ( const CFB::COMPOUND_FILE_ENTRY *  aStart,
const std::vector< std::string > &  aStreamPath 
) const

Definition at line 288 of file altium_binary_parser.cpp.

References FindStreamSingleLevel(), m_reader, and name.

◆ FindStream() [2/2]

const CFB::COMPOUND_FILE_ENTRY * ALTIUM_COMPOUND_FILE::FindStream ( const std::vector< std::string > &  aStreamPath) const

◆ FindStreamSingleLevel()

const CFB::COMPOUND_FILE_ENTRY * ALTIUM_COMPOUND_FILE::FindStreamSingleLevel ( const CFB::COMPOUND_FILE_ENTRY *  aEntry,
const std::string  aName,
const bool  aIsStream 
) const

Definition at line 176 of file altium_binary_parser.cpp.

References m_reader.

Referenced by FindStream().

◆ GetCompoundFileReader()

const CFB::CompoundFileReader & ALTIUM_COMPOUND_FILE::GetCompoundFileReader ( ) const
inline

◆ GetLibSymbols()

std::map< wxString, const CFB::COMPOUND_FILE_ENTRY * > ALTIUM_COMPOUND_FILE::GetLibSymbols ( const CFB::COMPOUND_FILE_ENTRY *  aStart) const

Definition at line 208 of file altium_binary_parser.cpp.

References m_reader.

Referenced by SCH_IO_ALTIUM::ParseLibFile().

◆ ListLibFootprints()

std::map< wxString, wxString > ALTIUM_COMPOUND_FILE::ListLibFootprints ( )

◆ operator=()

ALTIUM_COMPOUND_FILE & ALTIUM_COMPOUND_FILE::operator= ( const ALTIUM_COMPOUND_FILE temp_obj)
delete

Member Data Documentation

◆ m_buffer

std::vector<char> ALTIUM_COMPOUND_FILE::m_buffer
private

Definition at line 104 of file altium_binary_parser.h.

Referenced by ALTIUM_COMPOUND_FILE().

◆ m_libFootprintDirNameCache

std::map<wxString, wxString> ALTIUM_COMPOUND_FILE::m_libFootprintDirNameCache
private

Definition at line 107 of file altium_binary_parser.h.

Referenced by cacheLibFootprintNames(), and ListLibFootprints().

◆ m_libFootprintNameCache

std::map<wxString, const CFB::COMPOUND_FILE_ENTRY*> ALTIUM_COMPOUND_FILE::m_libFootprintNameCache
private

Definition at line 106 of file altium_binary_parser.h.

Referenced by cacheLibFootprintNames(), and FindLibFootprintDirName().

◆ m_reader

std::unique_ptr<CFB::CompoundFileReader> ALTIUM_COMPOUND_FILE::m_reader
private

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