.. index:: pair: class; EE::System::IOStream .. _doxid-class_e_e_1_1_system_1_1_i_o_stream: class EE::System::IOStream ========================== .. toctree:: :hidden: Overview ~~~~~~~~ An abstraction for custom input/output stream files. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class IOStream { public: // construction virtual :target:`~IOStream`(); // methods virtual :ref:`ios_size` :ref:`read`(char* data, :ref:`ios_size` size) = 0; virtual :ref:`ios_size` :ref:`write`(const char* data, :ref:`ios_size` size) = 0; virtual :ref:`ios_size` :ref:`seek`(:ref:`ios_size` position) = 0; virtual :ref:`ios_size` :ref:`tell`() = 0; virtual :ref:`ios_size` :ref:`getSize`() = 0; virtual bool :ref:`isOpen`() = 0; }; .. _details-class_e_e_1_1_system_1_1_i_o_stream: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An abstraction for custom input/output stream files. Methods ------- .. index:: pair: function; read .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1a673723c6ec387b362ff35e7ee28947e6: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` read(char* data, :ref:`ios_size` size) = 0 Read data from the stream. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Buffer where to copy the read data * - size - Desired number of bytes to read .. rubric:: Returns: The number of bytes actually read .. index:: pair: function; write .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1a1c3860c1fe8b8387203c0912b0d222c6: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` write(const char* data, :ref:`ios_size` size) = 0 Write data to the virtual file. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Data to write in the file * - size - Size of the data that needs to be writed .. index:: pair: function; seek .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1a961402e4701874fef9c276e09798dc2c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` seek(:ref:`ios_size` position) = 0 Change the current reading position. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - position - The position to seek to, from the beginning .. rubric:: Returns: The position actually sought to. .. index:: pair: function; tell .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1aeb41a08fa5f58c311192073bd126291b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` tell() = 0 Get the current reading position in the stream. .. rubric:: Returns: The current position, or -1 on error. .. index:: pair: function; getSize .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1af2b9d259a0eeb4e839417f7f71b1c117: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` getSize() = 0 Return the size of the stream. .. rubric:: Returns: The total number of bytes available in the stream .. index:: pair: function; isOpen .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_1a1c6877dde5607fe00591ad4b4ce0bbf2: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool isOpen() = 0 .. rubric:: Returns: If the virtual stream file is open