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; }
99 std::vector<FilterMatch> &matchVect)
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
129 BOOST_SERIALIZATION_ASSUME_ABSTRACT(FilterMatcherBase)
virtual std::string getName() const
virtual bool isValid() const =0
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)
virtual boost::shared_ptr< FilterMatcherBase > Clone() const =0
Clone.
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
Includes a bunch of functionality for handling Atom and Bond queries.
#define RDUNUSED_PARAM(x)
virtual bool hasMatch(const ROMol &mol) const =0
hasMatches
virtual bool getMatches(const ROMol &mol, std::vector< FilterMatch > &matchVect) const =0
getMatches
virtual ~FilterMatcherBase()