Public Member Functions | Private Attributes | List of all members
gnsstk::FileStore< HeaderType > Class Template Reference

Detailed Description

template<class HeaderType>
class gnsstk::FileStore< HeaderType >

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...
 

Constructor & Destructor Documentation

◆ FileStore()

template<class HeaderType >
gnsstk::FileStore< HeaderType >::FileStore ( )
inlinenoexcept

Constructor.

Definition at line 72 of file FileStore.hpp.

◆ ~FileStore()

template<class HeaderType >
gnsstk::FileStore< HeaderType >::~FileStore ( )
inline

destructor

Definition at line 75 of file FileStore.hpp.

Member Function Documentation

◆ addFile()

template<class HeaderType >
void gnsstk::FileStore< HeaderType >::addFile ( const std::string &  fn,
HeaderType &  header 
)
inline

Add a filename, with its header, to the store

Exceptions
InvalidRequest

Definition at line 89 of file FileStore.hpp.

◆ clear()

template<class HeaderType >
void gnsstk::FileStore< HeaderType >::clear ( )
inlinenoexcept

Clear the contents of the (filename, header) map.

Definition at line 134 of file FileStore.hpp.

◆ dump()

template<class HeaderType >
void gnsstk::FileStore< HeaderType >::dump ( std::ostream &  os = std::cout,
short  detail = 0 
) const
inlinenoexcept

dump a list of file names

Definition at line 116 of file FileStore.hpp.

◆ getFileNames()

template<class HeaderType >
std::vector<std::string> gnsstk::FileStore< HeaderType >::getFileNames ( ) const
inline

Get a list of all the file names in the store, as a vector<string>

Definition at line 78 of file FileStore.hpp.

◆ getHeader()

template<class HeaderType >
const HeaderType& gnsstk::FileStore< HeaderType >::getHeader ( const std::string &  fn) const
inline

Access the header for a given filename

Exceptions
InvalidRequest

Definition at line 101 of file FileStore.hpp.

◆ nfiles()

template<class HeaderType >
unsigned gnsstk::FileStore< HeaderType >::nfiles ( ) const
inlinenoexcept

Definition at line 144 of file FileStore.hpp.

◆ size()

template<class HeaderType >
unsigned gnsstk::FileStore< HeaderType >::size ( ) const
inlinenoexcept

Return the size of the (filename,header) map.

Definition at line 142 of file FileStore.hpp.

Member Data Documentation

◆ headerMap

template<class HeaderType >
std::map<std::string, HeaderType> gnsstk::FileStore< HeaderType >::headerMap
private

A store of all headers loaded, indexed by file name.

Definition at line 67 of file FileStore.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44