BALL 1.5.0
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
16namespace 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
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);
104 };
105
106} // namespace BALL
107
108#endif // BALL_FORMAT_KCFFILE_H
Definition: constants.h:13
char Atom[5]
Definition: PDBdefs.h:257
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
bool readDELIMITER_()
static const char * DELIMITER_TAG
Definition: KCFFile.h:37
bool readNODE_(Molecule &mol, IndexAtomMap &index_to_atom)
bool readEDGE_(IndexAtomMap &index_to_atom)
static const char * CONTINUED_LINE
Definition: KCFFile.h:38
static const char * ENTRY_TAG
Definition: KCFFile.h:34
KCFFile(const String &filename, File::OpenMode open_mode=std::ios::in)
virtual bool write(const Molecule &molecule)
HashMap< const Atom *, Position > AtomIndexMap
Definition: KCFFile.h:43
HashMap< Position, Atom * > IndexAtomMap
Definition: KCFFile.h:44
static const char * NODE_TAG
Definition: KCFFile.h:35
virtual bool write(const System &system)
virtual Molecule * read()
virtual bool read(System &system)
virtual ~KCFFile()
bool readENTRY_(Molecule &mol)
static const char * EDGE_TAG
Definition: KCFFile.h:36
std::ios::openmode OpenMode
Definition: file.h:165
#define BALL_EXPORT
Definition: COMMON/global.h:50