.. # split from OESystemFunctions.rst:1345

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEGetTag

.. oe:function:: OEGetTag


   Associates a text string tag with a
   corresponding unsigned integer tag. Because integer comparisons are
   often faster than character string comparisons, operations which
   require a potentially large number of data comparisons may benefit
   by using integer instead of string data. The :oe:func:`OESystem::OEGetTag` functions
   serve to associate, store and retrieve string and integer tags.

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

      .. oe:api::

         const char* OEGetTag(unsigned int tag)

   .. oe:language:: python

      .. oe:api:: python

         OEGetTag(arg1: int) -> str

   Retrieves a character string tag associated with an
   integer tag. If no string tag has been associated with the passed
   integer tag, a pointer to a null-terminated pointer character
   string is returned. The function should always return a non-zero
   pointer.

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

      .. oe:api::

         unsigned int OEGetTag(const std::string& tag)

   .. oe:language:: python

      .. oe:api:: python

         OEGetTag(arg1: str) -> int

   Retrieves an integer tag associated with the
   character string stored in the STL string object. The first call to
   :oe:func:`OESystem::OEGetTag` with a particular character string creates an association
   with an arbitrary unique integer, and returns the associated
   integer tag. Subsequent calls to :oe:func:`OESystem::OEGetTag` with the same character
   string value return the associated integer tag. No guarantees are
   made regarding the allocation of integer values associated with
   character string values.

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

      .. oe:api::

         unsigned int OEGetTag(const char* tag)

   .. oe:language:: python

      .. oe:api:: python

         OEGetTag(arg1: str) -> int

   Retrieves an integer tag associated with a constant
   character string. The first call to :oe:func:`OESystem::OEGetTag` with a particular
   character string creates an association with an arbitrary unique
   integer, and returns the associated integer tag. Subsequent calls
   to :oe:func:`OESystem::OEGetTag` with the same character string value return the
   associated integer tag. No guarantees are made regarding the
   allocation of integer values associated with character string
   values.

