.. oe:namespace:: OEChem



.. meta::
   :keywords: OEQBase, QBase


.. _OEChem_OEQBase:

.. oe:class:: OEQBase

   .. oe:api::


      class OEQBase

   This class represents `OEQBase`.

   The :ref:`OEQBase <OEChem_OEQBase>` is the abstract class which defines
   the API for storage and retrieval of expressions used in graph
   matching operations.

   The following classes derive from this class:
    * :ref:`OEQAtomBase <OEChem_OEQAtomBase>`
    * :ref:`OEQBondBase <OEChem_OEQBondBase>`
   

   .. oe:method:: GetExpr

      .. oe:language:: c++ java csharp

         .. oe:api::

            const OEExprBase* GetExpr() const = 0
            OEExprBase* GetExpr() =0

      .. oe:language:: python

         .. oe:api:: python

            GetExpr() -> OEExprBase

      This pure virtual method defines the interface for retrieving a
      stored expressions from a :ref:`OEQBase <OEChem_OEQBase>` parent class
      instance.
      If no expression was stored previously a NULL pointer may be
      returned.
      The pointer returned from this method should therefore be
      checked before use.

   .. oe:method:: SetExpr

      .. oe:language:: c++ java csharp

         .. oe:api::

            bool SetExpr(const OEExprBase *)=0
            bool SetExpr(const OEExprBase &)=0

      .. oe:language:: python

         .. oe:api:: python

            SetExpr(arg2: OEExprBase) -> bool

     This pure virtual method defines the interface for storage of an
     expression. The parent class instance takes ownership of the
     memory associated with the expression pointer.
     Any existing expressions stored in the parent instance will be
     destroyed.
     Stored expressions are destroyed along with their parent
     :ref:`OEQBase <OEChem_OEQBase>` object.

