|
PSCF v1.3.3
|
Loading archive for text istream. More...
#include <TextFileIArchive.h>
Public Member Functions | |
| TextFileIArchive () | |
| Constructor. | |
| TextFileIArchive (std::string filename) | |
| Constructor. | |
| TextFileIArchive (std::ifstream &file) | |
| Constructor. | |
| virtual | ~TextFileIArchive () |
| Destructor. | |
| std::ifstream & | file () |
| Get the underlying ifstream by reference. | |
| template<typename T> | |
| TextFileIArchive & | operator>> (T &data) |
| Load one object of type T via operator >>. | |
| template<typename T> | |
| TextFileIArchive & | operator& (T &data) |
| Load one object of type T via operator &. | |
| template<typename T, size_t N> | |
| TextFileIArchive & | operator>> (T(&data)[N]) |
| Load a fixed-size array via operator >>. | |
| template<typename T, size_t N> | |
| TextFileIArchive & | operator& (T(&data)[N]) |
| Load a fixed-size array via operator &. | |
| template<typename T> | |
| void | unpack (T &data) |
| Load a single T object. | |
| template<typename T> | |
| void | unpack (T *array, int n) |
| Load a C-array of T objects. | |
| template<typename T> | |
| void | unpack (T *array, int m, int n, int np) |
| Load a 2D C array. | |
Static Public Member Functions | |
| static bool | is_saving () |
| Is this a saving (output) archive? | |
| static bool | is_loading () |
| Is this a loading (input) archive? | |
Loading archive for text istream.
Definition at line 30 of file TextFileIArchive.h.
| Util::TextFileIArchive::TextFileIArchive | ( | ) |
Constructor.
Definition at line 18 of file TextFileIArchive.cpp.
Referenced by operator&(), operator&(), operator>>(), and operator>>().
| Util::TextFileIArchive::TextFileIArchive | ( | std::string | filename | ) |
Constructor.
| filename | name of file to open for reading. |
Definition at line 27 of file TextFileIArchive.cpp.
| Util::TextFileIArchive::TextFileIArchive | ( | std::ifstream & | file | ) |
Constructor.
| file | output file |
Definition at line 37 of file TextFileIArchive.cpp.
References file().
|
virtual |
Destructor.
Definition at line 51 of file TextFileIArchive.cpp.
|
inlinestatic |
Is this a saving (output) archive?
Returns false.
Definition at line 178 of file TextFileIArchive.h.
|
inlinestatic |
| std::ifstream & Util::TextFileIArchive::file | ( | ) |
Get the underlying ifstream by reference.
Definition at line 61 of file TextFileIArchive.cpp.
Referenced by TextFileIArchive().
|
inline |
Load one object of type T via operator >>.
Implementation calls a global serialize function, which thus must exist.
| data | object of type T to be loaded from archive |
Definition at line 190 of file TextFileIArchive.h.
References TextFileIArchive().
|
inline |
Load one object of type T via operator &.
Equivalent to operator >>.
| data | object of type T to be loaded from archive |
Definition at line 200 of file TextFileIArchive.h.
References TextFileIArchive().
|
inline |
Load a fixed-size array via operator >>.
Applies a serialize function to each element of array.
| data | array of fixed size N with elements of type T |
Definition at line 210 of file TextFileIArchive.h.
References TextFileIArchive().
|
inline |
Load a fixed-size array via operator &.
Equivalent to operator >>.
| data | array of fixed size N with elements of type T |
Definition at line 222 of file TextFileIArchive.h.
References TextFileIArchive().
|
inline |
Load a single T object.
This template uses the ifstream >> extractor operator to unpack object data. It will thus work for any type T for which the extractor operator is defined.
| data | object to be loaded from this archive. |
Definition at line 236 of file TextFileIArchive.h.
|
inline |
Load a C-array of T objects.
This template uses the ifstream >> extractor operator to unpack each element of a C array. It will thus work for any type T for which the extractor operator is defined.
| array | pointer to array of T objecs. |
| n | number of elements in array |
Definition at line 243 of file TextFileIArchive.h.
| void Util::TextFileIArchive::unpack | ( | T * | array, |
| int | m, | ||
| int | n, | ||
| int | np ) |
Load a 2D C array.
This template uses the ifstream >> extractor operator to unpack each element of a 2D C array. It will thus work for any type T for which the extractor operator is defined.
| array | pointer to first row or element |
| m | logical number of rows |
| n | logical number of columns |
| np | physical number of columns (elements allocated per row) |
Definition at line 254 of file TextFileIArchive.h.