32 #ifndef _RD_FILTER_CATALOG_PARAMS_ 33 #define _RD_FILTER_CATALOG_PARAMS_ 66 :
RDCatalog::CatalogParams(other), d_catalogs(other.d_catalogs) {}
83 const std::vector<FilterCatalogs> &
getCatalogs()
const {
return d_catalogs; }
88 virtual void toStream(std::ostream &ss)
const;
97 std::vector<FilterCatalogs> d_catalogs;
99 #ifdef RDK_USE_BOOST_SERIALIZATION 100 friend class boost::serialization::access;
101 template <
class Archive>
102 void serialize(Archive &ar,
const unsigned int version) {
113 typedef boost::shared_ptr<FilterCatalogEntry>
SENTRY;
115 #if BOOST_VERSION / 100000 >= 1 && (BOOST_VERSION / 100 % 1000) > 44 116 #define BOOST_PYTHON_SUPPORT_SHARED_CONST 119 #ifdef BOOST_PYTHON_SUPPORT_SHARED_CONST 122 typedef boost::shared_ptr<const entryType_t>
CONST_SENTRY;
130 : FCatalog(), d_entries() {
139 : FCatalog(rhs), d_entries(rhs.d_entries) {}
157 bool updateFPLength =
true);
168 virtual unsigned int addEntry(SENTRY entry,
bool updateFPLength =
true);
179 bool removeEntry(
unsigned int idx);
180 bool removeEntry(CONST_SENTRY entry);
190 CONST_SENTRY getEntry(
unsigned int idx)
const;
196 unsigned int getIdxForEntry(CONST_SENTRY entry)
const;
215 bool hasMatch(
const ROMol &mol)
const;
222 CONST_SENTRY getFirstMatch(
const ROMol &mol)
const;
229 const std::vector<CONST_SENTRY> getMatches(
const ROMol &mol)
const;
233 std::vector<SENTRY> d_entries;
virtual void toStream(std::ostream &ss) const
serializes (pickles) to a stream
void setTypeStr(const std::string &typeStr)
sets our type string
boost::shared_ptr< entryType_t > CONST_SENTRY
const std::vector< FilterCatalogs > & getCatalogs() const
Returns the existing list of FilterCatalogs to be used.
virtual void initFromString(const std::string &text)
initializes from a string pickle
FilterCatalog(const FilterCatalog &rhs)
ROMol is a molecule class that is intended to have a fixed topology.
RDCatalog::Catalog< FilterCatalogEntry, FilterCatalogParams > FCatalog
virtual void fillCatalog(FilterCatalog &catalog)
Fill a catalog with the appropriate entries.
virtual bool addCatalog(FilterCatalogs catalogs)
Adds an existing FilterCatalog specification to be used in the.
abstract base class for a catalog object
FilterCatalogParams(const FilterCatalogParams &other)
Includes a bunch of functionality for handling Atom and Bond queries.
#define RDUNUSED_PARAM(x)
FilterCatalog(const FilterCatalogParams ¶ms)
boost::shared_ptr< FilterCatalogEntry > SENTRY
virtual unsigned int getNumEntries() const
returns the number of entries in the catalog
bool FilterCatalogCanSerialize()
virtual std::string Serialize() const
returns a string with a serialized (pickled) representation
virtual void initFromStream(std::istream &ss)
initializes from a stream pickle
abstract base class for the container used to create a catalog
FilterCatalogParams(FilterCatalogs catalogs)
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
virtual ~FilterCatalogParams()