ccp4srs  Version 1.0.0
ccp4srs_entry.h
Go to the documentation of this file.
1 // $Id: ccp4srs_entry.h $
2 // =================================================================
3 //
4 // CCP4 SRS Library: Storage, Retrieval and Search support for
5 // CCP4 ligand data.
6 //
7 // Copyright (C) Eugene Krissinel 2010-2013.
8 //
9 // This library is free software: you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License version 3, modified in accordance with the provisions
12 // of the license to address the requirements of UK law.
13 //
14 // You should have received a copy of the modified GNU Lesser
15 // General Public License along with this library. If not, copies
16 // may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // =================================================================
24 //
25 // 18.09.13 <-- Date of Last Modification.
26 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 // -----------------------------------------------------------------
28 //
29 // **** Module : ccp4srs_entry <interface>
30 // ~~~~~~~~~
31 // **** Classes : ccp4srs::Entry - base class for all SRS entries
32 // ~~~~~~~~~
33 //
34 // (C) E. Krissinel 2010-2013
35 //
36 // =================================================================
37 //
38 
39 #ifndef CCP4SRS_ENTRY_H
40 #define CCP4SRS_ENTRY_H
41 
42 #include "memio_.h"
43 
44 namespace ccp4srs {
45 
46  DefineClass(Entry);
47 
48  class Entry {
49 
50  public:
51 
52  // entry types
53  enum {None,Monomer,Link};
54 
55  Entry();
56  virtual ~Entry();
57 
58  virtual int type() { return Entry::None; }
59 
60  int write ( mmdb::io::RFile f, int version, PMemIO memIO=NULL );
61  int read ( mmdb::io::RFile f, int version, PMemIO memIO=NULL );
62 
63  protected:
64 
65  virtual void write_mem ( PMemIO memIO, int version );
66  virtual bool read_mem ( PMemIO memIO, int version,
67  bool * Ok = NULL );
68 
69  };
70 
71 } // namespace ccp4srs
72 
73 
74 #endif // CCP4SRS_ENTRY_H
virtual void write_mem(PMemIO memIO, int version)
Definition: ccp4srs_entry.cpp:85
DefineClass(Angle)
Definition: ccp4srs_entry.h:48
Definition: ccp4srs_entry.h:53
virtual int type()
Definition: ccp4srs_entry.h:58
Definition: ccp4srs_entry.h:53
int read(mmdb::io::RFile f, int version, PMemIO memIO=NULL)
Definition: ccp4srs_entry.cpp:65
Definition: ccp4srs_entry.h:53
Definition: ccp4srs_angle.cpp:42
Entry()
Definition: ccp4srs_entry.cpp:44
virtual bool read_mem(PMemIO memIO, int version, bool *Ok=NULL)
Definition: ccp4srs_entry.cpp:90
int write(mmdb::io::RFile f, int version, PMemIO memIO=NULL)
Definition: ccp4srs_entry.cpp:48
virtual ~Entry()
Definition: ccp4srs_entry.cpp:46