RDKit::FilterHierarchyMatcher Class Reference

`#include <FilterMatchers.h>`

Inheritance diagram for RDKit::FilterHierarchyMatcher:

## Public Member Functions

| FilterHierarchyMatcher ()
| FilterHierarchyMatcher (const FilterMatcherBase &matcher)
std::string | getName () const override
| Return the name for this node (from the underlying FilterMatcherBase) More...
bool | isValid () const override
| 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)
bool | getMatches (const ROMol &mol, std::vector< FilterMatch > &matches) const override
| returns the FilterMatches against the given molecule More...
bool | hasMatch (const ROMol &mol) const override
| Does this node match the molecule. More...
boost::shared_ptr< FilterMatcherBase > | copy () const override
| copys the FilterHierarchyMatcher into a FilterMatcherBase More...
Public Member Functions inherited from RDKit::FilterMatcherBase
| FilterMatcherBase (std::string name=DEFAULT_FILTERMATCHERBASE_NAME)
| FilterMatcherBase (const FilterMatcherBase &rhs)
virtual | ~FilterMatcherBase ()
virtual boost::shared_ptr< FilterMatcherBase > | Clone () const

## Detailed Description

Definition at line 459 of file FilterMatchers.h.

## Constructor & Destructor Documentation

## FilterHierarchyMatcher() [1/2]

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

inline

Definition at line 466 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 475 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 505 of file FilterMatchers.h.

References PRECONDITION.

## copy()

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

inline override virtual

copys the FilterHierarchyMatcher into a FilterMatcherBase

Implements RDKit::FilterMatcherBase.

Definition at line 533 of file FilterMatchers.h.

## getMatches()

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

override virtual

returns the FilterMatches against the given molecule

Implements RDKit::FilterMatcherBase.

## getName()

std::string RDKit::FilterHierarchyMatcher::getName | ( |  | ) | const

inline override virtual

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

Reimplemented from RDKit::FilterMatcherBase.

Definition at line 479 of file FilterMatchers.h.

## hasMatch()

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

inline override virtual

Does this node match the molecule.

Implements RDKit::FilterMatcherBase.

Definition at line 527 of file FilterMatchers.h.

## isValid()

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

inline override virtual

returns true if this node has a valid matcher

Implements RDKit::FilterMatcherBase.

Definition at line 487 of file FilterMatchers.h.

## setPattern()

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

inline

Set a new FilterMatcherBase for this node.

Definition at line 493 of file FilterMatchers.h.

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

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

- FilterMatchers.h