RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
CatalogEntry.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_CATALOGENTRY_H__
12
#define __RD_CATALOGENTRY_H__
13
14
#include <string>
15
16
namespace
RDCatalog
{
17
18
//! Abstract base class to be used to represent an entry in a Catalog
19
class
RDKIT_CATALOGS_EXPORT
CatalogEntry
{
20
public
:
21
virtual
~CatalogEntry
() = 0;
22
23
//! sets our bit Id
24
void
setBitId
(
int
bid) { d_bitId = bid; }
25
26
//! returns our bit Id
27
int
getBitId
()
const
{
return
d_bitId; }
28
29
//! returns a text description of this entry
30
virtual
std::string
getDescription
()
const
= 0;
31
32
//! serializes (pickles) to a stream
33
virtual
void
toStream
(std::ostream &ss)
const
= 0;
34
//! returns a string with a serialized (pickled) representation
35
virtual
std::string
Serialize
()
const
= 0;
36
//! initializes from a stream pickle
37
virtual
void
initFromStream
(std::istream &ss) = 0;
38
//! initializes from a string pickle
39
virtual
void
initFromString
(
const
std::string &text) = 0;
40
41
private
:
42
int
d_bitId;
//!< our bit Id. This needs to be signed so that we can mark
43
// uninitialized entries.
44
};
45
}
// namespace RDCatalog
46
47
#endif
RDCatalog::CatalogEntry
Abstract base class to be used to represent an entry in a Catalog.
Definition
CatalogEntry.h:19
RDCatalog::CatalogEntry::initFromStream
virtual void initFromStream(std::istream &ss)=0
initializes from a stream pickle
RDCatalog::CatalogEntry::getBitId
int getBitId() const
returns our bit Id
Definition
CatalogEntry.h:27
RDCatalog::CatalogEntry::getDescription
virtual std::string getDescription() const =0
returns a text description of this entry
RDCatalog::CatalogEntry::initFromString
virtual void initFromString(const std::string &text)=0
initializes from a string pickle
RDCatalog::CatalogEntry::setBitId
void setBitId(int bid)
sets our bit Id
Definition
CatalogEntry.h:24
RDCatalog::CatalogEntry::~CatalogEntry
virtual ~CatalogEntry()=0
RDCatalog::CatalogEntry::toStream
virtual void toStream(std::ostream &ss) const =0
serializes (pickles) to a stream
RDCatalog::CatalogEntry::Serialize
virtual std::string Serialize() const =0
returns a string with a serialized (pickled) representation
export.h
RDKIT_CATALOGS_EXPORT
#define RDKIT_CATALOGS_EXPORT
Definition
export.h:51
RDCatalog
Definition
Catalog.h:31
Catalogs
CatalogEntry.h
Generated on
for RDKit by
1.17.0