Chemical Data Processing Library C++ API - Version 1.1.1
PSDMolecularGraphWriter.hpp
Go to the documentation of this file.
1 /*
2  * PSDMolecularGraphWriter.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_PHARM_PSDMOLECULARGRAPHWRITER_HPP
30 #define CDPL_PHARM_PSDMOLECULARGRAPHWRITER_HPP
31 
32 #include <string>
33 #include <iosfwd>
34 
35 #include "CDPL/Pharm/APIPrefix.hpp"
37 #include "CDPL/Base/DataWriter.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Chem
44  {
45 
46  class MolecularGraph;
47  }
48 
49  namespace Pharm
50  {
51 
55  class CDPL_PHARM_API PSDMolecularGraphWriter : public Base::DataWriter<Chem::MolecularGraph>
56  {
57 
58  public:
64  PSDMolecularGraphWriter(std::iostream& ios);
65 
71  PSDMolecularGraphWriter(const std::string& file_name);
72 
74 
76 
77  void close();
78 
79  operator const void*() const;
80  bool operator!() const;
81 
82  private:
83  PSDScreeningDBCreator creator;
84  std::iostream* output;
85  std::streampos outputPos;
86  bool state;
87  bool closed;
88  };
89  } // namespace Pharm
90 } // namespace CDPL
91 
92 #endif // CDPL_PHARM_PSDMOLECULARGRAPHWRITER_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_PHARM_API.
CDPL_PHARM_API
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
DataWriter.hpp
Definition of the class CDPL::Base::DataWriter.
CDPL::Pharm::PSDMolecularGraphWriter
A writer for molecular graph data in the PSD-format of the CDPL.
Definition: PSDMolecularGraphWriter.hpp:56
CDPL::Pharm::PSDMolecularGraphWriter::PSDMolecularGraphWriter
PSDMolecularGraphWriter(std::iostream &ios)
Constructs a PSDMolecularGraphWriter instance that will write the molecular graph data to the I/O str...
CDPL::Pharm::PSDScreeningDBCreator
A class for the creation of optimized pharmacophore screening databases.
Definition: PSDScreeningDBCreator.hpp:50
CDPL::Pharm::PSDMolecularGraphWriter::close
void close()
Writes format dependent data (if required) to mark the end of output.
CDPL::Pharm::PSDMolecularGraphWriter::operator!
bool operator!() const
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::Pharm::PSDMolecularGraphWriter::PSDMolecularGraphWriter
PSDMolecularGraphWriter(const std::string &file_name)
Constructs a PSDMolecularGraphWriter instance that will write the molecular graph data to the output ...
CDPL::Pharm::PSDMolecularGraphWriter::write
PSDMolecularGraphWriter & write(const Chem::MolecularGraph &molgraph)
Writes the data object obj.
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Pharm::PSDMolecularGraphWriter::~PSDMolecularGraphWriter
~PSDMolecularGraphWriter()
PSDScreeningDBCreator.hpp
Definition of the class CDPL::Pharm::PSDScreeningDBCreator.
CDPL::Base::DataWriter
An interface for writing data objects of a given type to an arbitrary data sink.
Definition: DataWriter.hpp:63