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;
57 : filterMatch(filter), atomPairs(atomPairs) {}
60 : filterMatch(rhs.filterMatch), atomPairs(rhs.atomPairs) {}
63 return (filterMatch.get() == rhs.
filterMatch.get() &&
70 :
public boost::enable_shared_from_this<FilterMatcherBase> {
73 std::string d_filterName;
82 d_filterName(rhs.d_filterName) {}
86 virtual bool isValid()
const = 0;
88 virtual std::string
getName()
const {
return d_filterName; }
98 virtual bool getMatches(
const ROMol &mol,
99 std::vector<FilterMatch> &matchVect)
const = 0;
109 virtual bool hasMatch(
const ROMol &mol)
const = 0;
115 virtual boost::shared_ptr<FilterMatcherBase> Clone()
const = 0;
118 #ifdef RDK_USE_BOOST_SERIALIZATION 119 friend class boost::serialization::access;
120 template <
class Archive>
121 void serialize(Archive &ar,
const unsigned int version) {
128 #ifdef RDK_USE_BOOST_SERIALIZATION
virtual std::string getName() const
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
bool operator==(const FilterMatch &rhs)
pulls in the core RDKit functionality
ROMol is a molecule class that is intended to have a fixed topology.
FilterMatch(const FilterMatch &rhs)
FilterMatcherBase(const FilterMatcherBase &rhs)
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
Includes a bunch of functionality for handling Atom and Bond queries.
#define RDUNUSED_PARAM(x)
virtual ~FilterMatcherBase()