Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Chem::TautomerizationRule Class Referenceabstract

Abstract base class for tautomerization rule implementations employed by the Chem::TautomerGenerator class. More...

#include <TautomerizationRule.hpp>

+ Inheritance diagram for CDPL::Chem::TautomerizationRule:

Public Types

typedef std::shared_ptr< TautomerizationRuleSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated TautomerizationRule instances. More...
 

Public Member Functions

virtual ~TautomerizationRule ()
 Virtual destructor. More...
 
virtual bool setup (MolecularGraph &parent_molgraph)=0
 Performs rule-specific setup work for the given molecular graph that shall be tautomerized. More...
 
virtual unsigned int getID () const =0
 Returns the rule identifier. More...
 
virtual bool generate (Molecule &tautomer)=0
 Generates the next tautomer of the parent molecular graph and stores it in molecule. More...
 
virtual SharedPointer clone () const =0
 Returns a deep copy of this rule instance. More...
 

Detailed Description

Abstract base class for tautomerization rule implementations employed by the Chem::TautomerGenerator class.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated TautomerizationRule instances.

Constructor & Destructor Documentation

◆ ~TautomerizationRule()

virtual CDPL::Chem::TautomerizationRule::~TautomerizationRule ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ setup()

virtual bool CDPL::Chem::TautomerizationRule::setup ( MolecularGraph parent_molgraph)
pure virtual

Performs rule-specific setup work for the given molecular graph that shall be tautomerized.

Parameters
parent_molgraphThe molecular graph to tautomerize.
Returns
true if the rule can be applied to parent_molgraph and has been initialized, and false otherwise.

Implemented in CDPL::Chem::PatternBasedTautomerizationRule, and CDPL::Chem::ConjugatedRingBondPatternSwitching.

◆ getID()

virtual unsigned int CDPL::Chem::TautomerizationRule::getID ( ) const
pure virtual

Returns the rule identifier.

Returns
The rule identifier (see namespace Chem::TautomerizationType for IDs of built-in rules).

Implemented in CDPL::Chem::PatternBasedTautomerizationRule, and CDPL::Chem::ConjugatedRingBondPatternSwitching.

◆ generate()

virtual bool CDPL::Chem::TautomerizationRule::generate ( Molecule tautomer)
pure virtual

Generates the next tautomer of the parent molecular graph and stores it in molecule.

Parameters
tautomerThe tautomer output molecule.
Returns
true if a tautomer was generated, false if no more tautomers could be generated.
See also
setup()

Implemented in CDPL::Chem::PatternBasedTautomerizationRule, and CDPL::Chem::ConjugatedRingBondPatternSwitching.

◆ clone()

virtual SharedPointer CDPL::Chem::TautomerizationRule::clone ( ) const
pure virtual

Returns a deep copy of this rule instance.

Returns
A shared pointer to the cloned rule.

Implemented in CDPL::Chem::PatternBasedTautomerizationRule, and CDPL::Chem::ConjugatedRingBondPatternSwitching.


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