33 #ifndef __RD_FILTER_MATCHER_BASE_H__
34 #define __RD_FILTER_MATCHER_BASE_H__
38 #ifdef RDK_USE_BOOST_SERIALIZATION
40 #include <boost/archive/text_oarchive.hpp>
41 #include <boost/archive/text_iarchive.hpp>
42 #include <boost/serialization/assume_abstract.hpp>
43 #include <boost/enable_shared_from_this.hpp>
45 #endif // RDK_USE_BOOST_SERIALIZATION
49 class FilterMatcherBase;
59 : filterMatch(filter), atomPairs(atomPairs) {}
62 : filterMatch(rhs.filterMatch), atomPairs(rhs.atomPairs) {}
65 return (filterMatch.get() == rhs.
filterMatch.get() &&
70 return !(filterMatch.get() == rhs.
filterMatch.get() &&
77 :
public boost::enable_shared_from_this<FilterMatcherBase> {
80 std::string d_filterName;
89 d_filterName(rhs.d_filterName) {}
93 virtual bool isValid()
const = 0;
95 virtual std::string
getName()
const {
return d_filterName; }
105 virtual bool getMatches(
const ROMol &mol,
106 std::vector<FilterMatch> &matchVect)
const = 0;
116 virtual bool hasMatch(
const ROMol &mol)
const = 0;
122 virtual boost::shared_ptr<FilterMatcherBase>
Clone()
const {
124 <<
"FilterMatcherBase::Clone is deprecated, use copy instead"
133 virtual boost::shared_ptr<FilterMatcherBase> copy()
const = 0;
136 #ifdef RDK_USE_BOOST_SERIALIZATION
137 friend class boost::serialization::access;
138 template <
class Archive>
139 void serialize(Archive &ar,
const unsigned int version) {
146 #ifdef RDK_USE_BOOST_SERIALIZATION
147 BOOST_SERIALIZATION_ASSUME_ABSTRACT(FilterMatcherBase)