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

.. oe:namespace:: OEChem

.. oe:class:: OEHasPolymerType

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEHasPolymerType
      
   This functor can be used to identify monomers with the given polymer type
   (:oe:constns:`OEChem::OEPolymerType`).
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEHasPolymerType(unsigned polymerType)

      .. oe:language:: python

         .. oe:api:: python

            OEHasPolymerType(polymerType: int) -> OEHasPolymerType

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

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

         .. oe:api::

            OEHasPolymerType(const OEHasPolymerType &)

      .. oe:language:: python

         .. oe:api:: python

            OEHasPolymerType(arg2: OEHasPolymerType) -> OEHasPolymerType

      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 polymer type
      the :oe:cls:`OEChem::OEHasPolymerType` functor is initialized with.

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

      .. oe:api::

         OEHasPolymerType &operator=(const OEHasPolymerType &)

      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::OEHasPolymerType`
      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. 
