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
18 class RDKIT_CATALOGS_EXPORT CatalogParams {
19  public:
20   virtual ~CatalogParams() = 0;
21 
22   //! returns our type string
getTypeStr()23   std::string getTypeStr() const { return d_typeStr; };
24 
25   //! sets our type string
setTypeStr(const std::string & typeStr)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 }  // namespace RDCatalog
41 
42 #endif
43