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 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
RDKIT_RDGENERAL_EXPORT std::shared_ptr< boost::logging::rdLogger > rdWarningLog
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
virtual ~FilterMatcherBase()