26#ifndef ATTACHMENTSOURCE_H
27#define ATTACHMENTSOURCE_H
52 using Files = std::map<wxString, std::string>;
63 bool IsEmpty()
const {
return m_wxmxFile.IsEmpty() && !m_files; }
70 wxMemoryBuffer
Read(
const wxString &name)
const;
76 std::shared_ptr<const Files> m_files;
The files a worksheet's XML refers to by name.
Definition: AttachmentSource.h:49
wxMemoryBuffer Read(const wxString &name) const
The contents of the file with this name.
Definition: AttachmentSource.cpp:37
static AttachmentSource FromMemory(Files files)
Files held in memory.
Definition: AttachmentSource.cpp:31
static AttachmentSource FromWxmx(const wxString &wxmxFile)
The files stored in a .wxmx (that is: zip) archive.
Definition: AttachmentSource.cpp:25
bool IsEmpty() const
True if names refer to the file system instead of to attachments.
Definition: AttachmentSource.h:63
AttachmentSource()=default
No files at all: names refer to the file system.
std::map< wxString, std::string > Files
The files, by name.
Definition: AttachmentSource.h:52