.. oe:namespace:: OEPlatform



.. meta::
   :keywords: oeistdstream, istdstream


.. _OEPlatform_oeistdstream:

.. oe:class:: oeistdstream

   .. oe:api::


      class oeistdstream : public oeistream

   This class represents `oeistdstream`.

   
   Implements a wrapper stream around a standard C++ input stream
   (``std::istream``).


   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>`                                                                              
   ============================================================= ============================================================ ============================================================

   .. oe:method:: Constructors

      .. oe:api::

         oeistdstream()
         oeistdstream(std::istream* isptr, bool del)

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

   .. oe:method:: clear

      .. oe:api::

         void clear()

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

   .. oe:method:: set

      .. oe:api::

         bool set(std::istream* isptr, bool del)

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

         std::istream* stream()

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