.. oe:namespace:: OEChem



.. meta::
   :keywords: OEIsProductGroup, IsProductGroup


.. _OEChem_OEIsProductGroup:

.. oe:class:: OEIsProductGroup

   .. oe:api::

      class  OEIsProductGroup : public OESystem::OEUnaryPredicate<OEGroupBase>

   This class represents the :ref:`OEIsProductGroup <OEChem_OEIsProductGroup>` functor that
   identifies groups (:ref:`OEGroupBase <OEChem_OEGroupBase>`) that represent
   reaction component information which contain at least one atom
   identified by :oe:meth:`OEChem::OEAtomBase::GetRxnRole` as being
   a :oe:const:`OEChem::OERxnRole::Product` atom.

   .. seealso::

      * :oe:constns:`OEChem::OEGroupType` for built-in group types.
      * :oe:constns:`OEChem::OERxnRole` for reaction role types.

   The following methods are publicly inherited from :ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>`:

   ============================================================================== ============================================================================== ===============================================================================
   :oe:meth:`operator()<OESystem::OEUnaryPredicate::operator()>`                  :oe:meth:`CreateCopy<OESystem::OEUnaryPredicate::CreateCopy>`                  :oe:meth:`CreatePredicateCopy<OESystem::OEUnaryPredicate::CreatePredicateCopy>`
   ============================================================================== ============================================================================== ===============================================================================

   The following methods are publicly inherited from :ref:`OEUnaryFunction <OESystem_OEUnaryFunction>`:

   ============================================================ ============================================================
   :oe:meth:`operator()<OESystem::OEUnaryFunction::operator()>` :oe:meth:`CreateCopy<OESystem::OEUnaryFunction::CreateCopy>`
   ============================================================ ============================================================

   .. ################################################################
      #
      ################################################################
   .. oe:method:: Constructors

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

         .. oe:api::

            OEIsProductGroup()

      .. oe:language:: python

         .. oe:api:: python

            OEIsProductGroup() -> OEIsProductGroup

      Default constructor.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: operator()

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

         .. oe:api::

            bool operator()(const OEGroupBase& group) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(group: OEGroupBase) -> bool

      Returns ``true``, if the value returned by the
      :oe:meth:`OEChem::OEGroupBase::GetGroupType` method is equal
      to the following constant:

      * :oe:const:`OEChem::OEGroupType::Component`

      and which contain one or more atoms identified as products.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEUnaryFunction<OEGroupBase, bool>* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEUnaryGroupBoolFunc

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEIsProductGroup <OEChem_OEIsProductGroup>`
      object is dynamically allocated  and owned by the caller.

      .. oe:language:: c++

         The returned copy should be deallocated using C++
         delete operator in order to prevent a memory leak.
