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() &&
78 :
public boost::enable_shared_from_this<FilterMatcherBase> {
81 std::string d_filterName;
90 d_filterName(rhs.d_filterName) {}
94 virtual bool isValid()
const = 0;
96 virtual std::string
getName()
const {
return d_filterName; }
106 virtual bool getMatches(
const ROMol &mol,
107 std::vector<FilterMatch> &matchVect)
const = 0;
117 virtual bool hasMatch(
const ROMol &mol)
const = 0;
123 virtual boost::shared_ptr<FilterMatcherBase>
Clone()
const {
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 bool operator!=(const FilterMatch &rhs) const
#define BOOST_LOG(__arg__)
virtual std::string getName() const
virtual boost::shared_ptr< FilterMatcherBase > Clone() const
Clone - deprecated.
RDKIT_FILTERCATALOG_EXPORT const char * DEFAULT_FILTERMATCHERBASE_NAME
FilterMatcherBase(const std::string &name=DEFAULT_FILTERMATCHERBASE_NAME)
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx) ...
Holds the atomPairs matched by the underlying matcher.
boost::shared_ptr< FilterMatcherBase > filterMatch
pulls in the core RDKit functionality
FilterMatch(const FilterMatch &rhs)
FilterMatcherBase(const FilterMatcherBase &rhs)
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
#define RDKIT_FILTERCATALOG_EXPORT
#define RDUNUSED_PARAM(x)
bool operator==(const FilterMatch &rhs) const
RDKIT_RDGENERAL_EXPORT boost::logging::rdLogger * rdWarningLog
virtual ~FilterMatcherBase()