RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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
16namespace 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} // namespace RDCatalog
41
42#endif
abstract base class for the container used to create a catalog
virtual std::string Serialize() const =0
returns a string with a serialized (pickled) representation
virtual void initFromStream(std::istream &ss)=0
initializes from a stream pickle
std::string getTypeStr() const
returns our type string
std::string d_typeStr
our type string
virtual void toStream(std::ostream &) const =0
serializes (pickles) to a stream
void setTypeStr(const std::string &typeStr)
sets our type string
virtual void initFromString(const std::string &text)=0
initializes from a string pickle
#define RDKIT_CATALOGS_EXPORT
Definition export.h:41