RDKit: CatalogParams.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 #ifndef __RD_CATALOGPARAMS_H__
11 #define __RD_CATALOGPARAMS_H__
12
13 #include <string>
14
15 namespace RDCatalog {
16 //! abstract base class for the container used to create a catalog
17 class CatalogParams {
18 public:
19 virtual ~CatalogParams() = 0;
20
21 //! returns our type string
22 std::string getTypeStr() const { return d_typeStr; };
23
24 //! sets our type string
25 void setTypeStr(const std::string &typeStr) { d_typeStr = typeStr; };
26
27 //! serializes (pickles) to a stream
28 virtual void toStream(std::ostream &) const = 0;
29 //! returns a string with a serialized (pickled) representation
30 virtual std::string Serialize() const = 0;
31 //! initializes from a stream pickle
32 virtual void initFromStream(std::istream &ss) = 0;
33 //! initializes from a string pickle
34 virtual void initFromString(const std::string &text) = 0;
35
36 protected:
37 std::string d_typeStr; //!< our type string
38 };
39 }
40
41 #endif
RDCatalog::CatalogParams::~CatalogParams
virtual ~CatalogParams()=0
RDCatalog::CatalogParams::setTypeStr
void setTypeStr(const std::string &typeStr)
sets our type string
Definition: CatalogParams.h:25
RDCatalog::CatalogParams::getTypeStr
std::string getTypeStr() const
returns our type string
Definition: CatalogParams.h:22
RDCatalog::CatalogParams::initFromStream
virtual void initFromStream(std::istream &ss)=0
initializes from a stream pickle
RDCatalog
Definition: Catalog.h:30
RDCatalog::CatalogParams::d_typeStr
std::string d_typeStr
our type string
Definition: CatalogParams.h:37
RDCatalog::CatalogParams::toStream
virtual void toStream(std::ostream &) const =0
serializes (pickles) to a stream
RDCatalog::CatalogParams::Serialize
virtual std::string Serialize() const =0
returns a string with a serialized (pickled) representation
RDCatalog::CatalogParams::initFromString
virtual void initFromString(const std::string &text)=0
initializes from a string pickle
RDCatalog::CatalogParams
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:17