ReFRACtor
|
To avoid creating files when an error occurs, we create the file with the name ".generating" appended. More...
#include <hdf_file_generating.h>
Public Member Functions | |
HdfFileGenerating (const std::string &Fname) | |
Create a HDF file with the given name. More... | |
virtual | ~HdfFileGenerating () |
void | abandon () |
Abandon a file and clean it up. More... | |
void | close () |
Close a file, changing the name to the final name. More... | |
HdfFile & | hdf_file () |
void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
To avoid creating files when an error occurs, we create the file with the name ".generating" appended.
Only after the file has been fully rewritten to we rename it without the ".generating" extension added.
This class handles this bit of logic.
Definition at line 16 of file hdf_file_generating.h.
|
inline |
Create a HDF file with the given name.
This should not have the ".generating" added, we add this in this class.
Definition at line 23 of file hdf_file_generating.h.
|
inlinevirtual |
Definition at line 24 of file hdf_file_generating.h.
void HdfFileGenerating::abandon | ( | ) |
Abandon a file and clean it up.
This would normally be called if an error condition occurs and we can't finish creating the file.
Definition at line 40 of file hdf_file_generating.cc.
void HdfFileGenerating::close | ( | ) |
Close a file, changing the name to the final name.
This is automatically called by the destructor, so you don't need to call this directly.
Definition at line 11 of file hdf_file_generating.cc.
HdfFile & HdfFileGenerating::hdf_file | ( | ) |
Definition at line 23 of file hdf_file_generating.cc.
void HdfFileGenerating::print | ( | std::ostream & | Os | ) | const |
Definition at line 55 of file hdf_file_generating.cc.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.