.. oe:namespace:: OEPlatform



.. meta::
   :keywords: oeiwrapperstream, iwrapperstream


.. _OEPlatform_oeiwrapperstream:

.. oe:class:: oeiwrapperstream

   .. oe:api::


      class oeiwrapperstream : public oeistream

   This class represents `oeiwrapperstream`.

   Implements a wrapper class to seamless contain and abstract the
   functionality of another :ref:`oeistream <OEPlatform_oeistream>`.

   The following methods are publicly inherited from :ref:`oeistream <OEPlatform_oeistream>`:
   


   ======================================================== ======================================================= =======================================================
   :oe:meth:`operator>><OEPlatform::oeistream::operator>>>` :oe:meth:`gettoken<OEPlatform::oeistream::gettoken>`    :oe:meth:`skipbyte<OEPlatform::oeistream::skipbyte>`   
   :oe:meth:`close<OEPlatform::oeistream::close>`           :oe:meth:`open<OEPlatform::oeistream::open>`            :oe:meth:`skipline<OEPlatform::oeistream::skipline>`   
   :oe:meth:`get<OEPlatform::oeistream::get>`               :oe:meth:`peekbyte<OEPlatform::oeistream::peekbyte>`                                                           
   :oe:meth:`getbyte<OEPlatform::oeistream::getbyte>`       :oe:meth:`read<OEPlatform::oeistream::read>`                                                                   
   :oe:meth:`getline<OEPlatform::oeistream::getline>`       :oe:meth:`skip<OEPlatform::oeistream::skip>`                                                                   
   ======================================================== ======================================================= =======================================================

   The following methods are publicly inherited from :ref:`oestream <OEPlatform_oestream>`:

   ============================================================= ============================================================ ============================================================
   :oe:meth:`operator bool<OEPlatform::oestream::operator bool>` :oe:meth:`rewind<OEPlatform::oestream::rewind>`              :oe:meth:`tell<OEPlatform::oestream::tell>`                 
   :oe:meth:`eof<OEPlatform::oestream::eof>`                     :oe:meth:`seek<OEPlatform::oestream::seek>`                                                                              
   :oe:meth:`length<OEPlatform::oestream::length>`               :oe:meth:`size<OEPlatform::oestream::size>`                                                                              
   ============================================================= ============================================================ ============================================================


   The following classes derive from this class:
    * :ref:`oeigzstream <OEPlatform_oeigzstream>`
    * :ref:`oeprogressstream <OESystem_oeprogressstream>`
   
   .. oe:method:: Constructors

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

         .. oe:api::

            oeiwrapperstream()
            oeiwrapperstream(oeistream* isptr, bool del)

      .. oe:language:: python

         .. oe:api:: python

            oeiwrapperstream() -> oeiwrapperstream
            oeiwrapperstream(isptr: oeistream, deleteptr: bool) -> oeiwrapperstream

      Creates a new :ref:`oeiwrapperstream <OEPlatform_oeiwrapperstream>`.
      Passing the 'isptr' and 'del'
      parameters is equivalent to using the default constructor and then
      calling :oe:meth:`set(isptr, del)<OEPlatform::oeiwrapperstream::set>` 
      on the newly created stream.

   .. oe:method:: clear

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

         .. oe:api::

            void clear()

      .. oe:language:: python

         .. oe:api:: python

            clear() -> None

      Clears the pointer to the wrapped stream. If the 'del' parameter was
      set to ``true`` when the wrapped stream was set 
      (:oe:meth:`OEPlatform::oeiwrapperstream::set`), the wrapped stream
      will be deleted before it is cleared.

   .. oe:method:: set

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

         .. oe:api::

            bool set(oeistream* isptr, bool del)

      .. oe:language:: python

         .. oe:api:: python

            set(isptr: oeistream, deleteptr: bool) -> bool

      Sets 'isptr' to be the stream wrapped by this class. If 'del' is ``true``,
      the wrapped stream will be deleted when the clear method is called
      or when this class is deleted. It is important to understand that
      by setting 'del' to ``true``, ownership of the stream's memory is
      transferred to this class, and if it is ``false``, you retain the
      responsibility for managing the stream's memory.

   .. oe:method:: stream

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

         .. oe:api::

            oeistream* stream()

      .. oe:language:: python

         .. oe:api:: python

            stream() -> oeistream

      Returns a pointer to the wrapped stream if present, otherwise ``0``.

