.. oe:namespace:: OEPlatform



.. meta::
   :keywords: oeowrapperstream, owrapperstream


.. _OEPlatform_oeowrapperstream:

.. oe:class:: oeowrapperstream

   .. oe:api::


      class oeowrapperstream : public oeostream

   This class represents `oeowrapperstream`.

   Implements a wrapper class to seamless contain and abstract the
   functionality of another :ref:`oeostream <OEPlatform_oeostream>`

   The following methods are publicly inherited from :ref:`oeostream <OEPlatform_oeostream>`:


   ========================================================= ======================================================= =======================================================
   :oe:meth:`operator\< <OEPlatform::oeostream::operator<<>` :oe:meth:`flush<OEPlatform::oeostream::flush>`          :oe:meth:`putbyte<OEPlatform::oeostream::putbyte>`     
   :oe:meth:`close<OEPlatform::oeostream::close>`            :oe:meth:`open<OEPlatform::oeostream::open>`            :oe:meth:`write<OEPlatform::oeostream::write>`         
   ========================================================= ======================================================= =======================================================

   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:`oeogzstream <OEPlatform_oeogzstream>`
   
   .. oe:method:: Constructors

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

         .. oe:api::

            oeowrapperstream()
            oeowrapperstream(oeostream* osptr, bool del)

      .. oe:language:: python

         .. oe:api:: python

            oeowrapperstream() -> oeowrapperstream
            oeowrapperstream(osptr: oeostream, deleteptr: bool) -> oeowrapperstream

      Creates a new :ref:`oeowrapperstream <OEPlatform_oeowrapperstream>`.
      Passing the 'osptr' and 'del'
      parameters is equivalent to using the default constructor and then
      calling :oe:meth:`set(osptr, del)<OEPlatform::oeowrapperstream::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::oeowrapperstream::set`), the wrapped stream
      will be deleted before it is cleared.

   .. oe:method:: set

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

         .. oe:api::

            bool set(oeostream* osptr, bool del)

      .. oe:language:: python

         .. oe:api:: python

            set(osptr: oeostream, deleteptr: bool) -> bool

      Sets 'osptr' 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::

            oeostream* stream()

      .. oe:language:: python

         .. oe:api:: python

            stream() -> oeostream

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

