class OEExprBase

This class represents OEExprBase.

The OEExprBase is an abstract class which defines an interface through which boolean expressions can test equivalence of nodes (atoms) and edges (bonds) during graph match processes. The expression class interface simplifies what is normally a binary tree representation of attributes which atoms and bonds must (not) have in order to be called equivalent to a corresponding node or edge. Derived classes may be used to extend the graph matching algorithms in OEChem to compare attributes beyond the pre-defined expressions in OEChem. In addition, user-defined expression classes may take full advantage of the arbitrary data storage mechanism which is part of the OEBase class. Expression equivalence could then be performed on dynamic user-defined data extensions to atoms and bonds.



Default and copy constructors.


OEExprBase *CreateCopy() const =0

Deep copy constructor that returns a copy of the object. The memory for the returned OEExprBase object is dynamically allocated and owned by the caller.


unsigned int GetType() const =0

This pure virtual method is designed to return a unique identifier for each OEExprBase implementation. A listing of type identifiers returned by classes in OEChem which are derived from the OEExprBase class can be found in the OEExprType namespace. User-defined implementations of the OEExprBase class should return value for this method which does not collide with types returned by implementations provided by OEChem.


const OEFuzzy &IsEquivalent(const OEBondBase *) const =0
const OEFuzzy &IsEquivalent(const OEAtomBase *) const =0

These pure virtual methods provide a common interface for testing attributes of atoms (OEAtomBase) and bonds (OEBondBase). Any method which does not modify an atom or bond may be called in an implementation of an OEExprBase.IsEquivalent method. The return value must be one of the OEFuzzy predefined instances of true (OEChem.FzTrue), false (OEChem.FzFalse), or maybe (OEChem.FzMaybe).