.. index:: pair: class; EE::System::IOStreamZip .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_zip: class EE::System::IOStreamZip ============================= .. toctree:: :hidden: Overview ~~~~~~~~ An implementation for a zip file steam. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class IOStreamZip: public :ref:`EE::System::IOStream` { public: // construction :ref:`IOStreamZip`(:ref:`Zip`* pack, const std::string& path); virtual :target:`~IOStreamZip`(); // methods static IOStreamZip* :target:`New`(:ref:`Zip`* pack, const std::string& path); virtual :ref:`ios_size` :ref:`read`(char* data, :ref:`ios_size` size); virtual :ref:`ios_size` :ref:`write`(const char* data, :ref:`ios_size` size); virtual :ref:`ios_size` :ref:`seek`(:ref:`ios_size` position); virtual :ref:`ios_size` :ref:`tell`(); virtual :ref:`ios_size` :ref:`getSize`(); virtual bool :ref:`isOpen`(); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // 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_zip: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An implementation for a zip file steam. Construction ------------ .. index:: pair: function; IOStreamZip .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_zip_1aa1928a97f50b5c6c903c7e0fabfd7f66: .. ref-code-block:: cpp :class: doxyrest-title-code-block IOStreamZip(:ref:`Zip`* pack, const std::string& path) Open a file from a zip file. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - pack - :ref:`Pack ` to open from path * - path - Path of the file in the pack file Methods ------- .. index:: pair: function; read .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_zip_1af61c22d4b301b9e366ded1d33973cc0c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` read(char* data, :ref:`ios_size` size) 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_zip_1a50865f8015824d833f8affeac66ada94: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` write(const char* data, :ref:`ios_size` size) 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_zip_1a514faca586d29aa1efb98ba740799254: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` seek(:ref:`ios_size` position) 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_zip_1ac685f283aa3dd2885b4862832a89c9d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` tell() 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_zip_1a54eec6027fa9f23f13214fd39cc7b446: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`ios_size` getSize() 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_zip_1afa30edea8f1f80340ad506d8838775c3: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool isOpen() .. rubric:: Returns: If the virtual stream file is open