Victor
 All Data Structures Functions Variables Friends Pages
RelSaver.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 #ifndef _REL_SAVER_H_
17 #define _REL_SAVER_H_
18 
19 // Includes:
20 #include <vector>
21 #include <Group.h>
22 #include <SideChain.h>
23 #include <AminoAcid.h>
24 #include <Spacer.h>
25 #include <Saver.h>
26 #include <Debug.h>
27 #include <string>
28 #include <iostream>
29 
30 // Global constants, typedefs, etc. (to avoid):
31 
32 namespace Victor { namespace Biopool {
33 
40  class RelSaver : public Saver {
41  public:
42 
43  // CONSTRUCTORS/DESTRUCTOR:
49  RelSaver(ostream& _output = cout, int _offset = 1)
50  : output(_output), offset(_offset) {
51  }
52  // this class uses the implicit copy operator.
53 
54  virtual ~RelSaver() {
55  PRINT_NAME;
56  }
57 
58  // MODIFIERS:
59  virtual void saveGroup(Group& gr);
60  virtual void saveSideChain(SideChain& sc);
61  virtual void saveAminoAcid(AminoAcid& aa);
62  virtual void saveSpacer(Spacer& sp);
63 
64  protected:
65  virtual void pSaveAtomVector(vector<Atom>& va);
66 
67  private:
68  ostream& output; // output stream
69  int offset; // ID offset for saving (optional) -- currently disabled
70  };
71 
72 }} //namespace
73 #endif //_REL_SAVER_H_
Base class for saving components (Atoms, Groups, etc.).
Definition: Saver.h:39
RelSaver(ostream &_output=cout, int _offset=1)
Definition: RelSaver.h:49
virtual void saveSideChain(SideChain &sc)
Definition: RelSaver.cc:48
virtual void saveGroup(Group &gr)
Definition: RelSaver.cc:37
Save components (Atoms, Groups, etc.) in relative format.
Definition: RelSaver.h:40
virtual void saveAminoAcid(AminoAcid &aa)
Definition: RelSaver.cc:60