CatalogParams.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2003-2006 Rational Discovery LLC
00003 //
00004 //  @@ All Rights Reserved @@
00005 //  This file is part of the RDKit.
00006 //  The contents are covered by the terms of the BSD license
00007 //  which is included in the file license.txt, found at the root
00008 //  of the RDKit source tree.
00009 //
00010 #ifndef __RD_CATALOGPARAMS_H__
00011 #define __RD_CATALOGPARAMS_H__
00012 
00013 #include <string>
00014 
00015 namespace RDCatalog {
00016   //! abstract base class for the container used to create a catalog
00017   class CatalogParams {
00018   public:
00019     virtual ~CatalogParams() = 0;
00020 
00021     //! returns our type string
00022     std::string getTypeStr() const { return d_typeStr; };
00023 
00024     //! sets our type string
00025     void setTypeStr(const std::string &typeStr) { d_typeStr=typeStr; };
00026 
00027     //! serializes (pickles) to a stream
00028     virtual void toStream(std::ostream &) const = 0;
00029     //! returns a string with a serialized (pickled) representation
00030     virtual std::string Serialize() const = 0;
00031     //! initializes from a stream pickle
00032     virtual void initFromStream(std::istream &ss) = 0;
00033     //! initializes from a string pickle
00034     virtual void initFromString(const std::string &text) = 0;
00035 
00036   protected:
00037     std::string d_typeStr; //!< our type string
00038   };
00039 }
00040 
00041 #endif