|
KiCad PCB EDA Suite
|
A compound file held in memory; any malformed structure throws IO_ERROR. More...
#include <easypc_file.h>
Public Member Functions | |
| COMPOUND_FILE (const wxString &aPath) | |
| ~COMPOUND_FILE () | |
| const SOURCE_FB_ENTRY & | Root () const |
| std::vector< const SOURCE_FB_ENTRY * > | Children (const SOURCE_FB_ENTRY &aStorage) const |
| The members of a storage in directory-tree order. | |
| const SOURCE_FB_ENTRY * | FindChild (const SOURCE_FB_ENTRY &aStorage, const std::u16string &aName) const |
| std::vector< uint8_t > | ReadStream (const SOURCE_FB_ENTRY &aStream) const |
| FILE_KIND | FileKind () const |
| int32_t | LibraryProduct () const |
| The LibFormat product, 1 when missing, short or 0. | |
Private Attributes | |
| std::vector< uint8_t > | m_image |
| std::unique_ptr< CFB::CompoundFileReader > | m_reader |
| std::map< uint32_t, SOURCE_FB_ENTRY > | m_entries |
| std::map< uint32_t, std::vector< uint32_t > > | m_children |
| storage id to member ids in tree order | |
A compound file held in memory; any malformed structure throws IO_ERROR.
Definition at line 79 of file easypc_file.h.
|
explicit |
Definition at line 109 of file easypc_file.cpp.
References _, m_children, m_entries, m_image, m_reader, EASYPC::ReadWholeFile(), and THROW_IO_ERROR.
|
default |
| std::vector< const SOURCE_FB_ENTRY * > EASYPC::COMPOUND_FILE::Children | ( | const SOURCE_FB_ENTRY & | aStorage | ) | const |
The members of a storage in directory-tree order.
Definition at line 186 of file easypc_file.cpp.
References EASYPC::SOURCE_FB_ENTRY::Id, m_children, and m_entries.
Referenced by FindChild().
| FILE_KIND EASYPC::COMPOUND_FILE::FileKind | ( | ) | const |
Definition at line 236 of file easypc_file.cpp.
References _, FindChild(), ReadStream(), Root(), text, and THROW_IO_ERROR.
Referenced by EASYPC::LoadDesign(), and EASYPC::Probe().
| const SOURCE_FB_ENTRY * EASYPC::COMPOUND_FILE::FindChild | ( | const SOURCE_FB_ENTRY & | aStorage, |
| const std::u16string & | aName ) const |
Definition at line 200 of file easypc_file.cpp.
References Children().
Referenced by FileKind(), LibraryProduct(), and EASYPC::LoadDesign().
| int32_t EASYPC::COMPOUND_FILE::LibraryProduct | ( | ) | const |
The LibFormat product, 1 when missing, short or 0.
Definition at line 259 of file easypc_file.cpp.
References FindChild(), ReadStream(), and Root().
| std::vector< uint8_t > EASYPC::COMPOUND_FILE::ReadStream | ( | const SOURCE_FB_ENTRY & | aStream | ) | const |
Definition at line 212 of file easypc_file.cpp.
References EASYPC::SOURCE_FB_ENTRY::Id, EASYPC::SOURCE_FB_ENTRY::IsStream(), m_image, and m_reader.
Referenced by FileKind(), LibraryProduct(), and EASYPC::LoadDesign().
|
inline |
Definition at line 85 of file easypc_file.h.
References m_entries.
Referenced by FileKind(), LibraryProduct(), and EASYPC::LoadDesign().
|
private |
storage id to member ids in tree order
Definition at line 102 of file easypc_file.h.
Referenced by Children(), and COMPOUND_FILE().
|
private |
Definition at line 101 of file easypc_file.h.
Referenced by Children(), COMPOUND_FILE(), and Root().
|
private |
Definition at line 99 of file easypc_file.h.
Referenced by COMPOUND_FILE(), and ReadStream().
|
private |
Definition at line 100 of file easypc_file.h.
Referenced by COMPOUND_FILE(), and ReadStream().