.. index:: pair: class; EE::System::PackManager .. _doxid-class_e_e_1_1_system_1_1_pack_manager: class EE::System::PackManager ============================= .. toctree:: :hidden: Overview ~~~~~~~~ The :ref:`Pack ` Manager keep track of the instanciated Packs. It's used to find files from any open pack. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class PackManager: protected :ref:`EE::System::Container` { public: // construction virtual :target:`~PackManager`(); // methods :ref:`Pack`* :ref:`exists`(std::string& path); :ref:`Pack`* :ref:`getPackByPath`(std::string path); const bool& :ref:`isFallbackToPacksActive`() const; void :ref:`setFallbackToPacks`(const bool& fallback); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods T* :ref:`add`(T* resource); bool :ref:`remove`(T* resource); :ref:`Uint32` :ref:`count`(); .. _details-class_e_e_1_1_system_1_1_pack_manager: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ The :ref:`Pack ` Manager keep track of the instanciated Packs. It's used to find files from any open pack. Methods ------- .. index:: pair: function; exists .. _doxid-class_e_e_1_1_system_1_1_pack_manager_1aa213007b920042c677b4ae916e90b47b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Pack`* exists(std::string& path) Searchs for the filepath in the packs, if the file is found it will return the pack that belongs to. \*. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - path - The file path to search. .. rubric:: Returns: The pack where the file exists. If the file is not found, returns NULL. \* .. index:: pair: function; getPackByPath .. _doxid-class_e_e_1_1_system_1_1_pack_manager_1aec1e486dcbb848a96bcd0ac1a872ce43: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Pack`* getPackByPath(std::string path) Search for a pack by its path. .. rubric:: Returns: The pack instance if found, otherwise returns NULL. .. index:: pair: function; isFallbackToPacksActive .. _doxid-class_e_e_1_1_system_1_1_pack_manager_1a74b53d3ee49a09ebc67aeac1e09df856: .. ref-code-block:: cpp :class: doxyrest-title-code-block const bool& isFallbackToPacksActive() const .. rubric:: Returns: If the packs opened are being used as a fallback in case of a file wasn't found in the file system path. .. index:: pair: function; setFallbackToPacks .. _doxid-class_e_e_1_1_system_1_1_pack_manager_1a3f8ad82b84657b1ec8e634722ee8afc6: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setFallbackToPacks(const bool& fallback) Sets if the files that failed to be loaded from the file system should try to be loaded from the currently open packs. For example if you try to load a texture from the file system a fails it will search the same path in the opened packs, and load it from there. \* TextureFactory::instance()->loadFromFile( "mytexture.png" ); If the file is not in the file system, it will be searched in the opened packs, and loaded if is found. \* In case that the process path is appended to the path... like Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path.