Chemical Data Processing Library C++ API - Version 1.1.1
Public Types | Public Member Functions | List of all members
CDPL::Chem::AtomBondMapping Class Reference

A data structure for the common storage of related atom to atom and bond to bond mappings. More...

#include <AtomBondMapping.hpp>

Public Types

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

Public Member Functions

const AtomMappinggetAtomMapping () const
 Returns a const reference to the Chem::AtomMapping data member storing the atom to atom mappings. More...
 
const BondMappinggetBondMapping () const
 Returns a const reference to the Chem::BondMapping data member storing the bond to bond mappings. More...
 
AtomMappinggetAtomMapping ()
 Returns a non-const reference to the Chem::AtomMapping data member storing the atom to atom mappings. More...
 
BondMappinggetBondMapping ()
 Returns a non-const reference to the Chem::BondMapping data member storing the bond to bond mappings. More...
 
void clear ()
 Removes all atom to atom and bond to bond mappings. More...
 
bool operator== (const AtomBondMapping &mapping) const
 Equality comparison operator. More...
 
bool operator!= (const AtomBondMapping &mapping) const
 Inequality comparison operator. More...
 

Detailed Description

A data structure for the common storage of related atom to atom and bond to bond mappings.

AtomBondMapping is used to represent arbitrary mappings between the atoms and bonds of two (or more) molecular graphs (e.g. results of a substructure search). The atom and bond mappings are stored in respective data members of type Chem::AtomMapping and Chem::BondMapping. They can be accessed by the provided getAtomMapping() and getBondMapping() family of overloaded methods.

Member Typedef Documentation

◆ SharedPointer

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

Member Function Documentation

◆ getAtomMapping() [1/2]

const AtomMapping& CDPL::Chem::AtomBondMapping::getAtomMapping ( ) const

Returns a const reference to the Chem::AtomMapping data member storing the atom to atom mappings.

Returns
A const reference to the Chem::AtomMapping data member.

◆ getBondMapping() [1/2]

const BondMapping& CDPL::Chem::AtomBondMapping::getBondMapping ( ) const

Returns a const reference to the Chem::BondMapping data member storing the bond to bond mappings.

Returns
A const reference to the Chem::BondMapping data member.

◆ getAtomMapping() [2/2]

AtomMapping& CDPL::Chem::AtomBondMapping::getAtomMapping ( )

Returns a non-const reference to the Chem::AtomMapping data member storing the atom to atom mappings.

Returns
A non-const reference to the Chem::AtomMapping data member.

◆ getBondMapping() [2/2]

BondMapping& CDPL::Chem::AtomBondMapping::getBondMapping ( )

Returns a non-const reference to the Chem::BondMapping data member storing the bond to bond mappings.

Returns
A non-const reference to the Chem::BondMapping data member.

◆ clear()

void CDPL::Chem::AtomBondMapping::clear ( )

Removes all atom to atom and bond to bond mappings.

◆ operator==()

bool CDPL::Chem::AtomBondMapping::operator== ( const AtomBondMapping mapping) const

Equality comparison operator.

Parameters
mappingThe other AtomBondMapping instance to be compared with.
Returns
true if the atom to atom and bond to bond mappings compare equal, and false otherwise.

◆ operator!=()

bool CDPL::Chem::AtomBondMapping::operator!= ( const AtomBondMapping mapping) const

Inequality comparison operator.

The result is equivalent to !(*this == mapping).

Parameters
mappingThe other AtomBondMapping instance to be compared with.
Returns
true if the atom to atom and/or bond to bond mappings compare non-equal, and false otherwise.
See also
operator==()

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