RDKit
Open-source cheminformatics and machine learning.
RDKit::FilterHierarchyMatcher Class Reference

#include <FilterMatchers.h>

Inheritance diagram for RDKit::FilterHierarchyMatcher:
RDKit::FilterMatcherBase

Public Member Functions

 FilterHierarchyMatcher ()
 
 FilterHierarchyMatcher (const FilterMatcherBase &matcher)
 
virtual std::string getName () const
 Return the name for this node (from the underlying FilterMatcherBase) More...
 
bool isValid () const
 returns true if this node has a valid matcher More...
 
void setPattern (const FilterMatcherBase &matcher)
 Set a new FilterMatcherBase for this node. More...
 
boost::shared_ptr< FilterHierarchyMatcheraddChild (const FilterHierarchyMatcher &hierarchy)
 
virtual bool getMatches (const ROMol &mol, std::vector< FilterMatch > &matches) const
 returns the FilterMatches against the given molecule More...
 
virtual bool hasMatch (const ROMol &mol) const
 Does this node match the molecule. More...
 
virtual boost::shared_ptr< FilterMatcherBasecopy () const
 copys the FilterHierarchyMatcher into a FilterMatcherBase More...
 
- Public Member Functions inherited from RDKit::FilterMatcherBase
 FilterMatcherBase (const std::string &name=DEFAULT_FILTERMATCHERBASE_NAME)
 
 FilterMatcherBase (const FilterMatcherBase &rhs)
 
virtual ~FilterMatcherBase ()
 
virtual boost::shared_ptr< FilterMatcherBaseClone () const
 Clone - deprecated. More...
 

Detailed Description

Definition at line 453 of file FilterMatchers.h.

Constructor & Destructor Documentation

◆ FilterHierarchyMatcher() [1/2]

RDKit::FilterHierarchyMatcher::FilterHierarchyMatcher ( )
inline

Definition at line 460 of file FilterMatchers.h.

◆ FilterHierarchyMatcher() [2/2]

RDKit::FilterHierarchyMatcher::FilterHierarchyMatcher ( const FilterMatcherBase matcher)
inline

Constructs a FilterHierarchyMatcher from a FilterMatchBase A FilterHierarchyMatcher is a tree hierarchy where to match a child node, one needs to match the parent first. For each branch, the lowest nodes are returned when getting the filter matches.

Definition at line 469 of file FilterMatchers.h.

Member Function Documentation

◆ addChild()

boost::shared_ptr<FilterHierarchyMatcher> RDKit::FilterHierarchyMatcher::addChild ( const FilterHierarchyMatcher hierarchy)
inline

add a FilterHierarchy as a child. returns the FilterHierarchy pointer used in the tree (this is a shallow copy of the original)

Definition at line 499 of file FilterMatchers.h.

References PRECONDITION.

◆ copy()

virtual boost::shared_ptr<FilterMatcherBase> RDKit::FilterHierarchyMatcher::copy ( ) const
inlinevirtual

copys the FilterHierarchyMatcher into a FilterMatcherBase

Implements RDKit::FilterMatcherBase.

Definition at line 527 of file FilterMatchers.h.

◆ getMatches()

virtual bool RDKit::FilterHierarchyMatcher::getMatches ( const ROMol mol,
std::vector< FilterMatch > &  matches 
) const
virtual

returns the FilterMatches against the given molecule

Implements RDKit::FilterMatcherBase.

◆ getName()

virtual std::string RDKit::FilterHierarchyMatcher::getName ( ) const
inlinevirtual

Return the name for this node (from the underlying FilterMatcherBase)

Reimplemented from RDKit::FilterMatcherBase.

Definition at line 473 of file FilterMatchers.h.

◆ hasMatch()

virtual bool RDKit::FilterHierarchyMatcher::hasMatch ( const ROMol mol) const
inlinevirtual

Does this node match the molecule.

Implements RDKit::FilterMatcherBase.

Definition at line 521 of file FilterMatchers.h.

◆ isValid()

bool RDKit::FilterHierarchyMatcher::isValid ( ) const
inlinevirtual

returns true if this node has a valid matcher

Implements RDKit::FilterMatcherBase.

Definition at line 481 of file FilterMatchers.h.

◆ setPattern()

void RDKit::FilterHierarchyMatcher::setPattern ( const FilterMatcherBase matcher)
inline

Set a new FilterMatcherBase for this node.

Definition at line 487 of file FilterMatchers.h.

References RDKit::FilterMatcherBase::copy(), RDKit::FilterMatcherBase::isValid(), and PRECONDITION.


The documentation for this class was generated from the following file: