BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
KCFFile.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_KCFFILE_H
6 #define BALL_FORMAT_KCFFILE_H
7 
8 #ifndef BALL_FORMAT_GENERICMOLFILE_H
10 #endif
11 
12 #ifndef BALL_MATHS_VECTOR3_H
13 # include <BALL/MATHS/vector3.h>
14 #endif
15 
16 namespace BALL
17 {
18  class System;
19  class Atom;
20  class Molecule;
21 
28  : public GenericMolFile
29  {
30  public:
31 
34  static const char* ENTRY_TAG;
35  static const char* NODE_TAG;
36  static const char* EDGE_TAG;
37  static const char* DELIMITER_TAG;
38  static const char* CONTINUED_LINE;
40 
46 
50 
53  KCFFile();
54 
58  KCFFile(const String& filename, File::OpenMode open_mode = std::ios::in);
59 
62  virtual ~KCFFile();
64 
68 
72  virtual bool write(const Molecule& molecule);
73 
78  virtual bool write(const System& system);
79 
85  virtual bool read(System& system);
86 
91  virtual Molecule* read();
92 
94  const KCFFile& operator = (const KCFFile& file);
95 
97 
98  protected:
99 
100  bool readENTRY_(Molecule& mol);
101  bool readNODE_(Molecule& mol, IndexAtomMap& index_to_atom);
102  bool readEDGE_(IndexAtomMap& index_to_atom);
103  bool readDELIMITER_();
104  };
105 
106 } // namespace BALL
107 
108 #endif // BALL_FORMAT_KCFFILE_H
static const char * ENTRY_TAG
Definition: KCFFile.h:34
std::ios::openmode OpenMode
Definition: file.h:168
static const char * CONTINUED_LINE
Definition: KCFFile.h:38
static const char * NODE_TAG
Definition: KCFFile.h:35
static const char * DELIMITER_TAG
Definition: KCFFile.h:37
static const char * EDGE_TAG
Definition: KCFFile.h:36
HashMap< const Atom *, Position > AtomIndexMap
Definition: KCFFile.h:43
char Atom[5]
Definition: PDBdefs.h:257
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73
#define BALL_EXPORT
Definition: COMMON/global.h:50
HashMap< Position, Atom * > IndexAtomMap
Definition: KCFFile.h:44