diff options
Diffstat (limited to 'src/libjin/filesystem/asset_database.h')
-rw-r--r-- | src/libjin/filesystem/asset_database.h | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/src/libjin/filesystem/asset_database.h b/src/libjin/filesystem/asset_database.h index 2d7d5a3..f7e6339 100644 --- a/src/libjin/filesystem/asset_database.h +++ b/src/libjin/filesystem/asset_database.h @@ -12,101 +12,101 @@ namespace JinEngine { - namespace Filesystem - { - - /// - /// Assets managment. - /// - class AssetDatabase : public Object - { - public: - /// - /// Get asset database singleton. - /// - /// @param Singleton of asset database. - /// - static AssetDatabase* get(); - - /// - /// Asset database constructor. - /// - AssetDatabase(); - - /// - /// Set asset root folder. - /// - /// @param root Root folder of assets. - /// - void mount(const char* root); - - /// - /// Check if the path is directory. - /// - /// @param path Path under asset folder. - /// @return True if the given path is directory, otherwise return false. - /// - bool isDir(const char* path); - - /// - /// Check if the path is file. - /// - /// @param path Path under asset folder. - /// @return True if the given path is file, otherwise return false. - /// - bool isFile(const char* path); - - /// - /// Check if the path exists. - /// @param path Given path. - /// @return True if path exists, otherwise return false. - /// - bool exists(const char* path); - - /// - /// Read file into a buffer. - /// - /// @param path Path of file. - /// @param buffer Buffer to fill. - /// @return True if read sucessful, otherwise return false. - /// - void read(const char* path, Buffer& buffer); - - /// - /// Read file and return data content. - /// - /// @param path Path of file. - /// @param length Length of data. - /// @return Data if read sucessful, otherwise return null. - /// - void* read(const char* path, unsigned int* length); - - /// - /// Get files under given directory. - /// - /// @param path Path of directory. - /// @param recursive Recursivily search folder. - /// @return File list under given directory. - /// - std::vector<std::string> getFiles(const char* directory, bool recursive = false); - - /// - /// Get full path of asset. - /// - /// @param path Path of asset. - /// @return Full path of asset. - /// - const char* getFull(const char* path); - - private: - static AssetDatabase* mAssetDatabase; + namespace Filesystem + { + + /// + /// Assets managment. + /// + class AssetDatabase : public Object + { + public: + /// + /// Get asset database singleton. + /// + /// @param Singleton of asset database. + /// + static AssetDatabase* get(); + + /// + /// Asset database constructor. + /// + AssetDatabase(); + + /// + /// Set asset root folder. + /// + /// @param root Root folder of assets. + /// + void mount(const char* root); + + /// + /// Check if the path is directory. + /// + /// @param path Path under asset folder. + /// @return True if the given path is directory, otherwise return false. + /// + bool isDir(const char* path); + + /// + /// Check if the path is file. + /// + /// @param path Path under asset folder. + /// @return True if the given path is file, otherwise return false. + /// + bool isFile(const char* path); + + /// + /// Check if the path exists. + /// @param path Given path. + /// @return True if path exists, otherwise return false. + /// + bool exists(const char* path); + + /// + /// Read file into a buffer. + /// + /// @param path Path of file. + /// @param buffer Buffer to fill. + /// @return True if read sucessful, otherwise return false. + /// + void read(const char* path, Buffer& buffer); + + /// + /// Read file and return data content. + /// + /// @param path Path of file. + /// @param length Length of data. + /// @return Data if read sucessful, otherwise return null. + /// + void* read(const char* path, unsigned int* length); + + /// + /// Get files under given directory. + /// + /// @param path Path of directory. + /// @param recursive Recursivily search folder. + /// @return File list under given directory. + /// + std::vector<std::string> getFiles(const char* directory, bool recursive = false); + + /// + /// Get full path of asset. + /// + /// @param path Path of asset. + /// @return Full path of asset. + /// + const char* getFull(const char* path); + + private: + static AssetDatabase* mAssetDatabase; #if jin_filesystem == jin_filesystem_smount - smtShared* mSmt; + smtShared* mSmt; #endif - }; + }; - } // namespace Filesystem + } // namespace Filesystem } // namespace JinEngine #endif // jin_filesystem |