.. index:: pair: class; EE::System::IOStreamPak .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_pak: class EE::System::IOStreamPak ============================= .. toctree:: :hidden: Overview ~~~~~~~~ An implementation for a zip file steam. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class IOStreamPak: public :ref:`EE::System::IOStream` { public: // construction :ref:`IOStreamPak`(:ref:`Pak`* pack, const std::string& path, bool writeMode = false); virtual :target:`~IOStreamPak`(); // methods static IOStreamPak* :target:`New`(:ref:`Pak`* pack, const std::string& path, bool writeMode = false); 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_pak: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An implementation for a zip file steam. Construction ------------ .. index:: pair: function; IOStreamPak .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_pak_1aac62161476851b9ae45652aee093d180: .. ref-code-block:: cpp :class: doxyrest-title-code-block IOStreamPak(:ref:`Pak`* pack, const std::string& path, bool writeMode = false) 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 * - writeMode - Set true if the PAK is in write mode Methods ------- .. index:: pair: function; read .. _doxid-class_e_e_1_1_system_1_1_i_o_stream_pak_1aa94490f7f00746918d5cf012ec8d636c: .. 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_pak_1add7606e20198bce92f24834f14437b53: .. 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_pak_1a9627fe631fa4cc5816e859946c5b6025: .. 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_pak_1a797a6b0f02bc9b3a7403cffad667a90f: .. 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_pak_1a2bbc629a73446b4bf002e13666bb4235: .. 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_pak_1ab74841b89385d9aece63ccc94cd7df8a: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool isOpen() .. rubric:: Returns: If the virtual stream file is open