#include <trajectoryFile.h>

Public Member Functions |
|
|
Constructors and Destructor
|
|
| TrajectoryFile () | |
| Default constructor. |
|
| TrajectoryFile (const TrajectoryFile &file) | |
| Copy constructor. |
|
| TrajectoryFile (const String &filename, File::OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound) | |
| Detailed constructor requiring a
filename and the mode in which this file should be opened.
|
|
| virtual | ~TrajectoryFile () |
| Destructor. |
|
|
Assignment
|
|
| const TrajectoryFile & | operator= (const TrajectoryFile &file) |
| Assignment operator. |
|
| virtual void | clear () |
| Clear method. |
|
|
Predicates
|
|
| bool | operator== (const TrajectoryFile &file) const |
| Equality operator. |
|
|
Accessors
|
|
| Size | getNumberOfSnapShots () const |
| get the number of snapshots stored
in this instance. |
|
| Size | getNumberOfAtoms () const |
| get the number of atoms coverd by
each snapshot. |
|
|
Public methods for file handling
|
|
| virtual bool | readHeader () |
| Read the header of an existing file.
|
|
| virtual bool | writeHeader () |
| Write a header. |
|
| virtual bool | append (const SnapShot &snapshot) |
| Append a
SnapShot to an existing file. |
|
| virtual bool | read (SnapShot &snapshot) |
| Read the next
SnapShot from the file. |
|
| virtual bool | flushToDisk (const std::vector< SnapShot > &buffer) throw (File::CannotWrite) |
| Write several SnapShots to disk.
|
|
Protected Attributes |
|
| Size | number_of_snapshots_ |
| Size | number_of_atoms_ |
This is more an interface definition than an actual class, because it would not make too much sense to create yet-another-trajectory-format. This class will be specialized by actual formats, like DCD.
| BALL::TrajectoryFile::TrajectoryFile | ( | const String & | filename, | |
| File::OpenMode | open_mode =
std::ios::in |
|||
| ) | throw (Exception::FileNotFound) |
Detailed constructor requiring a filename and the mode in which this file should be opened.
| filename | the name of the file | |
| open_mode | the mode in which this file should be opened |
| virtual bool BALL::TrajectoryFile::append | ( | const SnapShot & | snapshot | ) | [virtual] |
Append a SnapShot to an existing file.
Note that this method does note update the header.
| snapshot | the SnapShot we want to save |
Reimplemented in BALL::DCDFile, and BALL::TRRFile.
| virtual bool BALL::TrajectoryFile::flushToDisk | ( | const std::vector< SnapShot > & | buffer | ) | throw (File::CannotWrite)
[virtual] |
Write several SnapShots to disk.
| buffer | a vector of snapshots |
Reimplemented in BALL::DCDFile, and BALL::TRRFile.
| Size BALL::TrajectoryFile::getNumberOfAtoms | ( | ) | const |
get the number of atoms coverd by each snapshot.
| Size BALL::TrajectoryFile::getNumberOfSnapShots | ( | ) | const |
get the number of snapshots stored in this instance.
| virtual bool BALL::TrajectoryFile::read | ( | SnapShot & | snapshot | ) | [virtual] |
Read the next SnapShot from the file.
| snapshot | a buffer for result delivery |
false
ow.Reimplemented in BALL::DCDFile, and BALL::TRRFile.
| virtual bool BALL::TrajectoryFile::readHeader | ( | ) | [virtual] |
Read the header of an existing file.
Reimplemented in BALL::DCDFile.
| virtual bool BALL::TrajectoryFile::writeHeader | ( | ) | [virtual] |
Write a header.
Reimplemented in BALL::DCDFile.
1.5.8