|
Simpatico
v1.10
|
Saving archive for binary istream.
Definition at line 30 of file BinaryFileIArchive.h.
#include <BinaryFileIArchive.h>
Public Member Functions | |
| BinaryFileIArchive () | |
| Constructor. More... | |
| BinaryFileIArchive (std::string filename) | |
| Constructor. More... | |
| BinaryFileIArchive (std::ifstream &file) | |
| Constructor. More... | |
| virtual | ~BinaryFileIArchive () |
| Destructor. More... | |
| std::ifstream & | file () |
| Get the underlying ifstream by reference. More... | |
| template<typename T > | |
| BinaryFileIArchive & | operator& (T &data) |
| Read one object. More... | |
| template<typename T > | |
| BinaryFileIArchive & | operator>> (T &data) |
| Read one object. More... | |
| template<typename T > | |
| void | unpack (T &data) |
| Unpack a single T object. More... | |
| template<typename T > | |
| void | unpack (T *array, int n) |
| Unpack a C array. More... | |
| template<typename T > | |
| void | unpack (T *array, int m, int n, int np) |
| Unpack a 2D C array. More... | |
Static Public Member Functions | |
| static bool | is_saving () |
| Returns true;. More... | |
| static bool | is_loading () |
| Returns false;. More... | |
| Util::BinaryFileIArchive::BinaryFileIArchive | ( | ) |
Constructor.
Definition at line 18 of file BinaryFileIArchive.cpp.
| Util::BinaryFileIArchive::BinaryFileIArchive | ( | std::string | filename | ) |
Constructor.
| filename | name of file to open for reading. |
Definition at line 27 of file BinaryFileIArchive.cpp.
| Util::BinaryFileIArchive::BinaryFileIArchive | ( | std::ifstream & | file | ) |
|
virtual |
Destructor.
Definition at line 45 of file BinaryFileIArchive.cpp.
|
inlinestatic |
Returns true;.
Definition at line 128 of file BinaryFileIArchive.h.
|
inlinestatic |
Returns false;.
Definition at line 131 of file BinaryFileIArchive.h.
| std::ifstream & Util::BinaryFileIArchive::file | ( | ) |
Get the underlying ifstream by reference.
Definition at line 55 of file BinaryFileIArchive.cpp.
References unpack().
Referenced by McMd::MdSimulation::load(), McMd::McSimulation::load(), and DdMd::Simulation::load().
|
inline |
Read one object.
Definition at line 140 of file BinaryFileIArchive.h.
|
inline |
Read one object.
Definition at line 150 of file BinaryFileIArchive.h.
|
inline |
Unpack a single T object.
Definition at line 162 of file BinaryFileIArchive.h.
Referenced by file(), Util::CArrayParam< Type >::loadValue(), Util::CArray2DParam< Type >::loadValue(), and unpack().
|
inline |
Unpack a C array.
| array | pointer to array (or first element) |
| n | number of elements |
Definition at line 169 of file BinaryFileIArchive.h.
|
inline |
Unpack a 2D C array.
This unpacks the elements of an m x n logical array into a physical 2D C array of type array[][np], where np is the physical length of a row, i.e., the amount of memory allocated per row.
| array | pointer to first row |
| m | number of rows |
| n | logical number of columns |
| np | physical number of columns |
Definition at line 180 of file BinaryFileIArchive.h.
References unpack().
1.8.11