.. oe:namespace:: OESystem

.. meta::
   :keywords: OERoles, Roles


.. _OESystem_OERoles:

.. oe:class:: OERoles

   .. oe:api::

      class OERoles : public OESystem::OERoleSet

   The :ref:`OERoles <OESystem_OERoles>` class is a concrete instance of the
   :ref:`OERoleSet <OESystem_OERoleSet>` abstract base class.
   It is designed to be a very simple set
   container for :ref:`OERole <OESystem_OERole>` objects.
   Other containers with more specific purposes include
   :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>`, :ref:`OEMatch <OEChem_OEMatch>`,
   and :ref:`OEMatchBase <OEChem_OEMatchBase>`.

   The following methods are publicly inherited from :ref:`OERoleSet <OESystem_OERoleSet>`:
   
   ====================================================== ====================================================== ====================================================== 
   :oe:meth:`AddRole<OESystem::OERoleSet::AddRole>`       :oe:meth:`DeleteRole<OESystem::OERoleSet::DeleteRole>` :oe:meth:`HasRole<OESystem::OERoleSet::HasRole>`
   :oe:meth:`ClearRoles<OESystem::OERoleSet::ClearRoles>` :oe:meth:`GetRoles<OESystem::OERoleSet::GetRoles>`     :oe:meth:`NumRoles<OESystem::OERoleSet::NumRoles>`
   ====================================================== ====================================================== ====================================================== 
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OERoles()

      .. oe:language:: python

         .. oe:api:: python

            OERoles() -> OERoles

      Default constructor that generates an empty set.

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

         .. oe:api::

            OERoles(const OESystem::OERoleSet& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OERoles(rhs: OERoleSet) -> OERoles

      Copy constructor.

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

      .. oe:api::

         OERoles &operator=(const OESystem::OERoleSet &rhs)

      Assignment operator.

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OERoles* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OERoles

      Deep copy constructor that returns a copy of the object.
      The memory for the returned object
      is dynamically allocated and owned by the caller.

      .. oe:language:: c++ 

         To avoid a memory leak in C++,
         the returned pointer should be
         stored in a variable of the
         :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` template class
         or deallocated with the ``delete`` operator.
