KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ALTIUM_COMPOUND_FILE Class Reference

#include <altium_binary_parser.h>

Inheritance diagram for ALTIUM_COMPOUND_FILE:
ALTIUM_PCB_COMPOUND_FILE

Public Member Functions

 ALTIUM_COMPOUND_FILE ()
 Create an uninitialized file for two-step initialization (e.g. with InitFromBuffer)
 
 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
 
void InitFromBuffer (const void *aBuffer, size_t aLen)
 Load a CFB file from memory; may throw an IO_ERROR.
 
const CFB::CompoundFileReader & GetCompoundFileReader () const
 
bool DecodeIntLibStream (const CFB::COMPOUND_FILE_ENTRY &cfe, ALTIUM_COMPOUND_FILE *aOutput)
 
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, ALTIUM_SYMBOL_DATAGetLibSymbols (const CFB::COMPOUND_FILE_ENTRY *aStart) const
 

Private Attributes

std::unique_ptr< CFB::CompoundFileReader > m_reader
 
std::vector< char > m_buffer
 

Friends

class ALTIUM_PCB_COMPOUND_FILE
 

Detailed Description

Definition at line 68 of file altium_binary_parser.h.

Constructor & Destructor Documentation

◆ ALTIUM_COMPOUND_FILE() [1/4]

ALTIUM_COMPOUND_FILE::ALTIUM_COMPOUND_FILE ( )

Create an uninitialized file for two-step initialization (e.g. with InitFromBuffer)

Definition at line 50 of file altium_binary_parser.cpp.

◆ ALTIUM_COMPOUND_FILE() [2/4]

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 55 of file altium_binary_parser.cpp.

References _, m_buffer, m_reader, and THROW_IO_ERROR.

◆ ALTIUM_COMPOUND_FILE() [3/4]

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 98 of file altium_binary_parser.cpp.

References InitFromBuffer().

◆ ALTIUM_COMPOUND_FILE() [4/4]

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

◆ DecodeIntLibStream()

bool ALTIUM_COMPOUND_FILE::DecodeIntLibStream ( const CFB::COMPOUND_FILE_ENTRY &  cfe,
ALTIUM_COMPOUND_FILE aOutput 
)

Definition at line 120 of file altium_binary_parser.cpp.

References GetCompoundFileReader(), and InitFromBuffer().

◆ EnumDir()

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

Definition at line 242 of file altium_binary_parser.cpp.

References m_reader.

◆ 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 287 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 164 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, ALTIUM_SYMBOL_DATA > ALTIUM_COMPOUND_FILE::GetLibSymbols ( const CFB::COMPOUND_FILE_ENTRY *  aStart) const

Definition at line 196 of file altium_binary_parser.cpp.

References m_reader.

Referenced by SCH_IO_ALTIUM::ParseLibFile().

◆ InitFromBuffer()

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

Load a CFB file from memory; may throw an IO_ERROR.

Data is copied.

Parameters
aBufferdata buffer
aLendata length

Definition at line 104 of file altium_binary_parser.cpp.

References m_buffer, m_reader, and THROW_IO_ERROR.

Referenced by ALTIUM_COMPOUND_FILE(), and DecodeIntLibStream().

◆ operator=()

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

Friends And Related Function Documentation

◆ ALTIUM_PCB_COMPOUND_FILE

friend class ALTIUM_PCB_COMPOUND_FILE
friend

Definition at line 70 of file altium_binary_parser.h.

Member Data Documentation

◆ m_buffer

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

Definition at line 125 of file altium_binary_parser.h.

Referenced by ALTIUM_COMPOUND_FILE(), and InitFromBuffer().

◆ m_reader


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