.. oe:namespace:: OEChem



.. meta::
   :keywords: OEGetNbrAtom, GetNbrAtom


.. _OEChem_OEGetNbrAtom:

.. oe:class:: OEGetNbrAtom

   .. oe:api::


      class OEGetNbrAtom : public OESystem::OEUnaryFunction<OEChem::OEBondBase*, OEChem::OEAtomBase*>

   This class represents :ref:`OEGetNbrAtom <OEChem_OEGetNbrAtom>` functor that, when constructed
   with one atom and passed a bond,
   will return the neighbor atom which is across the bond from the
   construction atom.

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

            OEGetNbrAtom(const OEChem::OEAtomBase* atom)

      .. oe:language:: python

         .. oe:api:: python

            OEGetNbrAtom(atom: OEAtomBase) -> OEGetNbrAtom

      Constructs the functor with atom (:ref:`OEAtomBase <OEChem_OEAtomBase>`) as
      the reference atom used to find neighbors.

   .. oe:method:: operator()

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

         .. oe:api::

            result_type operator()(const argument_type &) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(arg2: OEBondBase) -> OEAtomBase

      Returns the :ref:`OEAtomBase <OEChem_OEAtomBase>` pointer that returned
      by the :oe:meth:`OEChem::OEBondBase::GetNbr` (atom), 
      where 'atom' is the construction :ref:`OEAtomBase <OEChem_OEAtomBase>`
      argument.

   .. oe:method: operator new IGNORED - INTERNAL USE ONLY

      .. oe:api::

         void *operator new(size_t)

   .. oe:method: operator delete IGNORED - INTERNAL USE ONLY

      .. oe:api::

         void operator delete(void *, size_t)

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEUnaryFunction<OEChem::OEBondBase *, OEChem::OEAtomBase *>* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEUnaryFuncBondAtom

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEGetNbrAtom <OEChem_OEGetNbrAtom>`
      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. 

