30#ifndef EASYPC_DOCUMENT_H
31#define EASYPC_DOCUMENT_H
53 std::vector<std::unique_ptr<OBJECT>>
Objects;
71 std::vector<std::unique_ptr<OBJECT>>
Objects;
78 std::vector<std::unique_ptr<OBJECT>>
Objects;
97 static long long Timestamp(
const wxString& aPath );
103 bool HasItem(
const wxString& aItemName )
const {
return m_byName.count( aItemName ) > 0; }
109 std::unique_ptr<LIBRARY_ITEM>
LoadItem(
const wxString& aItemName )
const;
123std::unique_ptr<DESIGN_DOCUMENT>
LoadDesign(
const wxString& aPath );
125std::unique_ptr<PROJECT_DOCUMENT>
LoadProject(
const wxString& aPath );
131wxString
ResolveProjectItem(
const wxString& aProjectPath,
const wxString& aItemName );
A compound file held in memory; any malformed structure throws IO_ERROR.
std::vector< const SOURCE_FB_ENTRY * > m_entries
std::unique_ptr< LIBRARY_ITEM > LoadItem(const wxString &aItemName) const
Throws IO_ERROR if no item has that name.
const std::vector< wxString > & Warnings() const
Warnings for item names that collide after unescaping.
bool HasItem(const wxString &aItemName) const
LIBRARY_FILE(const wxString &aPath)
Throws IO_ERROR when the file is not a library or is malformed.
std::map< wxString, size_t > m_byName
std::vector< wxString > m_warnings
static long long Timestamp(const wxString &aPath)
A library file's modification time, 0 when it does not exist.
std::vector< wxString > m_names
const std::vector< wxString > & ItemNames() const
Item names in directory order, unescaped.
Reader for the serialized streams of Easy-PC and DesignSpark PCB.
The project file (.prj), a bare archive stream.
The OLE compound file container, over thirdparty/compoundfilereader.
FILE_INFO Probe(const wxString &aPath)
Identify a file; projects are parsed fully, while designs and libraries are only inspected....
std::unique_ptr< DESIGN_DOCUMENT > LoadDesign(const wxString &aPath)
DOC_KIND
Document kind, from the FileType stream or the file extension for projects.
FILE_KIND
The FileType strings the importer reads.
wxString ResolveProjectItem(const wxString &aProjectPath, const wxString &aItemName)
The file a project item names, as Easy-PC opens it: the Windows path relative to the project's direct...
std::unique_ptr< PROJECT_DOCUMENT > LoadProject(const wxString &aPath)
std::unique_ptr< OBJECT > Design
design root, not in the load array
std::vector< uint8_t > SummaryInformation
the SummaryInformation stream, if any
std::vector< std::unique_ptr< OBJECT > > Objects
std::optional< FILE_KIND > FileKind
One stream, or for a component library every stream of the component's storage.
std::vector< LIBRARY_STREAM > Streams
for .cml "[ScmComponent]" first
std::vector< std::unique_ptr< OBJECT > > Objects
OBJECT * Item
what the stream's single ReadObject returned
Root of every deserialized object.
std::vector< std::unique_ptr< OBJECT > > Objects
std::unique_ptr< SOURCE_PROJECT > Project