.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

.. oe:class:: OEHasMonomerType

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEHasMonomerType
      
   This functor can be used to identify monomers with the given monomer type
   (:oe:constns:`OEChem::OEMonomerType`).
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEHasMonomerType(unsigned polymerType)

      .. oe:language:: python

         .. oe:api:: python

            OEHasMonomerType(monomerType: int) -> OEHasMonomerType

      Initializes the functor with the given polymer type from the 
      :oe:constns:`OEChem::OEMonomerType` namespace.

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

         .. oe:api::

            OEHasMonomerType(const OEHasMonomerType &)

      .. oe:language:: python

         .. oe:api:: python

            OEHasMonomerType(arg2: OEHasMonomerType) -> OEHasMonomerType

      Copy constructor.

   .. oe:method:: operator()

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

         .. oe:api::

            bool operator()(const OEMonomer &) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(arg2: OEMonomer) -> bool

      Returns true, if the given monomer has the same monomer type
      the :oe:cls:`OEChem::OEHasMonomerType` functor is initialized with.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEHasMonomerType &operator=(const OEHasMonomerType &)

      Assignment operator.

   .. oe:method:: CreateCopy

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEUnaryMonomerBoolFunc

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :oe:cls:`OEChem::OEHasMonomerType`
      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. 
