OpenStructure
promod_io_handler.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_IO_PROMOD_IO_HANDLER_HH
20 #define OST_IO_PROMOD_IO_HANDLER_HH
21 
22 /*
23  Author: Marco Biasini
24  */
25 
27 
28 namespace ost { namespace io {
29 
30 class DLLEXPORT_OST_IO PromodIOHandler : public SequenceIOHandler{
31 public:
32  virtual void Import(seq::SequenceList& ali,
33  const boost::filesystem::path& loc);
34 
35  virtual void Export(const seq::ConstSequenceList& ent,
36  const boost::filesystem::path& loc) const;
37 
38  virtual void Import(seq::SequenceList& ent,
39  std::istream& instream);
40 
41  virtual void Export(const seq::ConstSequenceList& ent,
42  std::ostream& ostream) const;
43 
44  static bool ProvidesImport(const boost::filesystem::path& loc,
45  const String& format="auto");
46  static bool ProvidesExport(const boost::filesystem::path& loc,
47  const String& format="auto");
48 
49  static String GetFormatName() { return String("ProMod"); }
50  static String GetFormatDescription() { return String("Format used by the SwissModel modeling server"); }
51 };
52 
53 typedef SequenceIOHandlerFactory<PromodIOHandler> PromodIOHandlerFactory;
54 
55 }}
56 
57 #endif
static bool ProvidesImport(const boost::filesystem::path &loc, const String &format="auto")
virtual void Export(const seq::ConstSequenceList &ent, std::ostream &ostream) const
virtual void Import(seq::SequenceList &ent, std::istream &instream)
static bool ProvidesExport(const boost::filesystem::path &loc, const String &format="auto")
virtual void Import(seq::SequenceList &ali, const boost::filesystem::path &loc)
virtual void Export(const seq::ConstSequenceList &ent, const boost::filesystem::path &loc) const
static String GetFormatDescription()
list of immutable sequences.
list of sequences.
#define DLLEXPORT_OST_IO
std::string String
Definition: base.hh:54
SequenceIOHandlerFactory< PromodIOHandler > PromodIOHandlerFactory
Definition: base.dox:1