32 #ifndef __RD_FILTER_MATCHER_BASE_H__ 33 #define __RD_FILTER_MATCHER_BASE_H__ 37 #ifdef RDK_USE_BOOST_SERIALIZATION 39 #include <boost/archive/text_oarchive.hpp> 40 #include <boost/archive/text_iarchive.hpp> 41 #include <boost/serialization/assume_abstract.hpp> 42 #include <boost/enable_shared_from_this.hpp> 44 #endif // RDK_USE_BOOST_SERIALIZATION 48 class FilterMatcherBase;
58 : filterMatch(filter), atomPairs(atomPairs) {}
61 : filterMatch(rhs.filterMatch), atomPairs(rhs.atomPairs) {}
64 return (filterMatch.get() == rhs.
filterMatch.get() &&
69 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 {
131 virtual boost::shared_ptr<FilterMatcherBase> copy()
const = 0;
134 #ifdef RDK_USE_BOOST_SERIALIZATION 135 friend class boost::serialization::access;
136 template <
class Archive>
137 void serialize(Archive &ar,
const unsigned int version) {
144 #ifdef RDK_USE_BOOST_SERIALIZATION bool operator!=(const FilterMatch &rhs) const
#define BOOST_LOG(__arg__)
virtual std::string getName() const
const char * DEFAULT_FILTERMATCHERBASE_NAME
virtual boost::shared_ptr< FilterMatcherBase > Clone() const
Clone - deprecated.
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
ROMol is a molecule class that is intended to have a fixed topology.
boost::logging::rdLogger * rdWarningLog
FilterMatch(const FilterMatch &rhs)
FilterMatcherBase(const FilterMatcherBase &rhs)
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
#define RDUNUSED_PARAM(x)
bool operator==(const FilterMatch &rhs) const
virtual ~FilterMatcherBase()