BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
genericMolFile.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_FORMAT_GENERICMOLFILE_H
6 #define BALL_FORMAT_GENERICMOLFILE_H
7 
8 #ifndef BALL_FORMAT_LINEBASEDFILE_H
10 #endif
11 
12 namespace BALL
13 {
14  class Atom;
15  class System;
16  class Molecule;
17 
57  : public LineBasedFile
58  {
59  public:
60 
64 
68 
72  GenericMolFile(const String& filename, File::OpenMode open_mode = std::ios::in);
73 
76  virtual ~GenericMolFile();
77 
78  virtual void close();
79 
81 
84 
89  const GenericMolFile& operator = (const GenericMolFile& rhs);
90 
93  void defineInputAsTemporary(bool b = true);
94 
97  void enableOutputCompression(String zipped_filename);
98 
99  bool isCompressedFile();
100 
102 
105 
115  virtual bool write(const System& system);
116 
123  virtual bool write(const Molecule& molecule);
124 
134  virtual bool read(System& system);
135 
146  virtual Molecule* read();
147 
149 
152 
157  virtual GenericMolFile& operator >> (System& system);
158 
163  virtual GenericMolFile& operator << (const System& system);
164 
169  virtual GenericMolFile& operator >> (Molecule& molecule);
170 
175  virtual GenericMolFile& operator << (const Molecule& molecule);
177 
178  protected:
186  virtual void initRead_();
187 
192  virtual void initWrite_();
193 
198 
199  };
200 } // namespace BALL
201 
202 #endif // BALL_FORMAT_GENERICMOLFILE_H
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
std::ios::openmode OpenMode
Definition: file.h:168
char Atom[5]
Definition: PDBdefs.h:257
#define BALL_EXPORT
Definition: COMMON/global.h:50