PSCF v1.1
|
Saving archive for character based ostream. More...
#include <TextFileOArchive.h>
Public Member Functions | |
TextFileOArchive () | |
Constructor. More... | |
TextFileOArchive (std::string filename) | |
Constructor. More... | |
TextFileOArchive (std::ofstream &file) | |
Constructor. More... | |
virtual | ~TextFileOArchive () |
Destructor. More... | |
std::ofstream & | file () |
Get the underlying ifstream by reference. More... | |
template<typename T > | |
TextFileOArchive & | operator& (T &data) |
Save one T object to this archive. More... | |
template<typename T > | |
TextFileOArchive & | operator<< (T &data) |
Save one T object to this archive. More... | |
template<typename T > | |
void | pack (const T &data) |
Save one T object to this archive. More... | |
template<typename T > | |
void | pack (const T *array, int n) |
Save a C-array of T objects to this archive. More... | |
template<typename T > | |
void | pack (const T *array, int m, int n, int np) |
Save a 2D C array to this archive. More... | |
Static Public Member Functions | |
static bool | is_saving () |
Returns true;. More... | |
static bool | is_loading () |
Returns false;. More... | |
Saving archive for character based ostream.
Definition at line 30 of file TextFileOArchive.h.
Util::TextFileOArchive::TextFileOArchive | ( | ) |
Constructor.
Definition at line 16 of file TextFileOArchive.cpp.
Util::TextFileOArchive::TextFileOArchive | ( | std::string | filename | ) |
Constructor.
filename | name of file to open for reading. |
Definition at line 25 of file TextFileOArchive.cpp.
Util::TextFileOArchive::TextFileOArchive | ( | std::ofstream & | file | ) |
Constructor.
file | output file |
Definition at line 35 of file TextFileOArchive.cpp.
References file(), and UTIL_THROW.
|
virtual |
Destructor.
Definition at line 48 of file TextFileOArchive.cpp.
|
inlinestatic |
Returns true;.
Definition at line 125 of file TextFileOArchive.h.
|
inlinestatic |
Returns false;.
Definition at line 128 of file TextFileOArchive.h.
std::ofstream & Util::TextFileOArchive::file | ( | ) |
Get the underlying ifstream by reference.
Definition at line 58 of file TextFileOArchive.cpp.
Referenced by TextFileOArchive().
|
inline |
Save one T object to this archive.
Definition at line 137 of file TextFileOArchive.h.
|
inline |
Save one T object to this archive.
Definition at line 147 of file TextFileOArchive.h.
|
inline |
Save one T object to this archive.
data | object to be written to file |
Definition at line 159 of file TextFileOArchive.h.
|
inline |
Save a C-array of T objects to this archive.
array | C array of T objects (pointer to first element) |
n | number of elements |
Definition at line 178 of file TextFileOArchive.h.
|
inline |
Save a 2D C array to this archive.
array | address of first element array[0][0] of 2D array |
m | logical number of rows |
n | logical number of columns |
np | physical number of columns |
Definition at line 190 of file TextFileOArchive.h.