This is an abstract class (loadFile is pure virtual) used to add a list of files and the interface to read files into a datastore. This is intended to support arbitrary file names, not a list of similiar file names. See the FileSpecFind framework for support of that type of file.
Definition at line 62 of file FileStore.hpp.
#include <FileStore.hpp>
Public Member Functions | |
void | addFile (const std::string &fn, HeaderType &header) |
void | clear () noexcept |
Clear the contents of the (filename, header) map. More... | |
void | dump (std::ostream &os=std::cout, short detail=0) const noexcept |
dump a list of file names More... | |
FileStore () noexcept | |
Constructor. More... | |
std::vector< std::string > | getFileNames () const |
Get a list of all the file names in the store, as a vector<string> More... | |
const HeaderType & | getHeader (const std::string &fn) const |
unsigned | nfiles () const noexcept |
unsigned | size () const noexcept |
Return the size of the (filename,header) map. More... | |
~FileStore () | |
destructor More... | |
Private Attributes | |
std::map< std::string, HeaderType > | headerMap |
A store of all headers loaded, indexed by file name. More... | |
|
inlinenoexcept |
Constructor.
Definition at line 72 of file FileStore.hpp.
|
inline |
destructor
Definition at line 75 of file FileStore.hpp.
|
inline |
Add a filename, with its header, to the store
InvalidRequest |
Definition at line 89 of file FileStore.hpp.
|
inlinenoexcept |
Clear the contents of the (filename, header) map.
Definition at line 134 of file FileStore.hpp.
|
inlinenoexcept |
dump a list of file names
Definition at line 116 of file FileStore.hpp.
|
inline |
Get a list of all the file names in the store, as a vector<string>
Definition at line 78 of file FileStore.hpp.
|
inline |
Access the header for a given filename
InvalidRequest |
Definition at line 101 of file FileStore.hpp.
|
inlinenoexcept |
Definition at line 144 of file FileStore.hpp.
|
inlinenoexcept |
Return the size of the (filename,header) map.
Definition at line 142 of file FileStore.hpp.
|
private |
A store of all headers loaded, indexed by file name.
Definition at line 67 of file FileStore.hpp.