.. oe:namespace:: OEChem



.. meta::
   :keywords: OEHasMonomerGroup, IsMDLStereoGroup


.. _OEChem_OEHasMonomerGroup:

.. oe:class:: OEHasMonomerGroup

   .. oe:api::

      class  OEHasMonomerGroup : public OESystem::OEUnaryPredicate<OEGroupBase>

   This class represents :ref:`OEHasMonomerGroup <OEChem_OEHasMonomerGroup>` functor that
   identifies groups (:ref:`OEGroupBase <OEChem_OEGroupBase>`) that are representing
   a monomer specified by a code.

   .. seealso::

      * :oe:cls:`OEChem::OEIsMonomerGroup` for a functor that identifies groups that store monomer information.

   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::

            OEHasMonomerGroup::OEHasMonomerGroup(const std::string codeSet,
                                                 const std::string code)

      .. oe:language:: python

         .. oe:api:: python

            __init__(code_set: str, code: str) -> OEHasMonomerGroup

      Constructor that takes a code set and a code to identify the monomer group.

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

   .. oe:method:: operator()
      :language: c++

      .. 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 group identifies a monomer with the code set and code
      specified in the constructor.


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

   .. 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:`OEHasMonomerGroup <OEChem_OEHasMonomerGroup>`
      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.
