33#ifndef __RD_FILTER_MATCHER_BASE_H__
34#define __RD_FILTER_MATCHER_BASE_H__
40#ifdef RDK_USE_BOOST_SERIALIZATION
42#include <boost/archive/text_oarchive.hpp>
43#include <boost/archive/text_iarchive.hpp>
44#include <boost/serialization/assume_abstract.hpp>
45#include <boost/enable_shared_from_this.hpp>
51class FilterMatcherBase;
61 : filterMatch(std::move(filter)), atomPairs(std::move(atomPairs)) {}
64 return (filterMatch.get() == rhs.
filterMatch.get() &&
69 return !(filterMatch.get() == rhs.
filterMatch.get() &&
76 :
public boost::enable_shared_from_this<FilterMatcherBase> {
79 std::string d_filterName;
84 d_filterName(std::move(name)) {}
88 d_filterName(rhs.d_filterName) {}
94 virtual std::string
getName()
const {
return d_filterName; }
105 std::vector<FilterMatch> &matchVect)
const = 0;
121 virtual boost::shared_ptr<FilterMatcherBase>
Clone()
const {
123 <<
"FilterMatcherBase::Clone is deprecated, use copy instead"
132 virtual boost::shared_ptr<FilterMatcherBase>
copy()
const = 0;
135#ifdef RDK_USE_BOOST_SERIALIZATION
136 friend class boost::serialization::access;
137 template <
class Archive>
138 void serialize(Archive &ar,
const unsigned int version) {
145#ifdef RDK_USE_BOOST_SERIALIZATION
#define RDUNUSED_PARAM(x)
pulls in the core RDKit functionality
#define BOOST_LOG(__arg__)
RDKIT_RDGENERAL_EXPORT RDLogger rdWarningLog
virtual boost::shared_ptr< FilterMatcherBase > copy() const =0
virtual bool getMatches(const ROMol &mol, std::vector< FilterMatch > &matchVect) const =0
getMatches
virtual bool isValid() const =0
virtual ~FilterMatcherBase()
virtual boost::shared_ptr< FilterMatcherBase > Clone() const
FilterMatcherBase(std::string name=DEFAULT_FILTERMATCHERBASE_NAME)
virtual std::string getName() const
virtual bool hasMatch(const ROMol &mol) const =0
hasMatches
FilterMatcherBase(const FilterMatcherBase &rhs)
#define RDKIT_FILTERCATALOG_EXPORT
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)
bool rdvalue_is(const RDValue_cast_t)
RDKIT_FILTERCATALOG_EXPORT const char * DEFAULT_FILTERMATCHERBASE_NAME
Holds the atomPairs matched by the underlying matcher.
bool operator==(const FilterMatch &rhs) const
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
boost::shared_ptr< FilterMatcherBase > filterMatch
bool operator!=(const FilterMatch &rhs) const