RDKit: RDKit::FilterHierarchyMatcher Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
RDKit::FilterHierarchyMatcher Class Reference

`#include <FilterMatchers.h>`

Inheritance diagram for RDKit::FilterHierarchyMatcher:

## 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< FilterHierarchyMatcher > | addChild (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< FilterMatcherBase > | copy () 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< FilterMatcherBase > | Clone () const
| Clone - deprecated. More...

## Detailed Description

Definition at line 452 of file FilterMatchers.h.

## Constructor & Destructor Documentation

RDKit::FilterHierarchyMatcher::FilterHierarchyMatcher | ( |  | ) |
| inline

Definition at line 458 of file FilterMatchers.h.

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 470 of file FilterMatchers.h.

## Member Function Documentation

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 504 of file FilterMatchers.h.

References RDKit::FilterMatchOps::And::getMatches(), and PRECONDITION.

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

copys the FilterHierarchyMatcher into a FilterMatcherBase

Implements RDKit::FilterMatcherBase.

Definition at line 531 of file FilterMatchers.h.

References RDUNUSED_PARAM.

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

returns the FilterMatches against the given molecule

Implements RDKit::FilterMatcherBase.

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 476 of file FilterMatchers.h.

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

Does this node match the molecule.

Implements RDKit::FilterMatcherBase.

Definition at line 525 of file FilterMatchers.h.

References RDKit::FilterMatchOps::And::getMatches().

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

returns true if this node has a valid matcher

Implements RDKit::FilterMatcherBase.

Definition at line 484 of file FilterMatchers.h.

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

Set a new FilterMatcherBase for this node.

Definition at line 492 of file FilterMatchers.h.

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

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

- FilterMatchers.h