 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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) {}
95 virtual std::string
getName()
const {
return d_filterName; }
106 std::vector<FilterMatch> &matchVect)
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
147 BOOST_SERIALIZATION_ASSUME_ABSTRACT(FilterMatcherBase)
#define BOOST_LOG(__arg__)
boost::shared_ptr< FilterMatcherBase > filterMatch
Holds the atomPairs matched by the underlying matcher.
FilterMatch(boost::shared_ptr< FilterMatcherBase > filter, MatchVectType atomPairs)
bool operator==(const FilterMatch &rhs) const
RDKIT_FILTERCATALOG_EXPORT const char * DEFAULT_FILTERMATCHERBASE_NAME
virtual std::string getName() const
virtual bool getMatches(const ROMol &mol, std::vector< FilterMatch > &matchVect) const =0
getMatches
FilterMatch(const FilterMatch &rhs)
#define RDUNUSED_PARAM(x)
virtual bool isValid() const =0
virtual bool hasMatch(const ROMol &mol) const =0
hasMatches
FilterMatcherBase(const FilterMatcherBase &rhs)
virtual boost::shared_ptr< FilterMatcherBase > copy() const =0
copy
pulls in the core RDKit functionality
virtual ~FilterMatcherBase()
#define RDKIT_FILTERCATALOG_EXPORT
virtual boost::shared_ptr< FilterMatcherBase > Clone() const
Clone - deprecated.
RDKIT_RDGENERAL_EXPORT std::shared_ptr< boost::logging::rdLogger > rdWarningLog
FilterMatcherBase(const std::string &name=DEFAULT_FILTERMATCHERBASE_NAME)
bool operator!=(const FilterMatch &rhs) const
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)