RDKit
Open-source cheminformatics and machine learning.
CatalogParams.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2003-2006 Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #include <RDGeneral/export.h>
11 #ifndef __RD_CATALOGPARAMS_H__
12 #define __RD_CATALOGPARAMS_H__
13 
14 #include <string>
15 
16 namespace RDCatalog {
17 //! abstract base class for the container used to create a catalog
19  public:
20  virtual ~CatalogParams() = 0;
21 
22  //! returns our type string
23  std::string getTypeStr() const { return d_typeStr; };
24 
25  //! sets our type string
26  void setTypeStr(const std::string &typeStr) { d_typeStr = typeStr; };
27 
28  //! serializes (pickles) to a stream
29  virtual void toStream(std::ostream &) const = 0;
30  //! returns a string with a serialized (pickled) representation
31  virtual std::string Serialize() const = 0;
32  //! initializes from a stream pickle
33  virtual void initFromStream(std::istream &ss) = 0;
34  //! initializes from a string pickle
35  virtual void initFromString(const std::string &text) = 0;
36 
37  protected:
38  std::string d_typeStr; //!< our type string
39 };
40 }
41 
42 #endif
void setTypeStr(const std::string &typeStr)
sets our type string
Definition: CatalogParams.h:26
std::string d_typeStr
our type string
Definition: CatalogParams.h:38
#define RDKIT_CATALOGS_EXPORT
Definition: export.h:47
std::string getTypeStr() const
returns our type string
Definition: CatalogParams.h:23
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:18