diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-19 20:49:09 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-19 20:49:09 +0100 |
commit | 0f9f379a4dec7ad9d1dce30af5e2259931692c5f (patch) | |
tree | d84a76559d99fd6a3541d0087538564d79e39470 /src/crepe/Asset.h | |
parent | 38a2476bcfa41b6d83a9a72d35f5acb684dc87fd (diff) | |
parent | 0476a8e9dbe7afb422862f7b1c15aaed7f3c416e (diff) |
merge with master
Diffstat (limited to 'src/crepe/Asset.h')
-rw-r--r-- | src/crepe/Asset.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/crepe/Asset.h b/src/crepe/Asset.h index 0cb5834..9051c5e 100644 --- a/src/crepe/Asset.h +++ b/src/crepe/Asset.h @@ -9,8 +9,8 @@ namespace crepe { /** * \brief Asset location helper * - * This class is used to locate and canonicalize paths to game asset files, and - * should *always* be used when retrieving files from disk. + * This class is used to locate and canonicalize paths to game asset files, and should *always* + * be used when retrieving files from disk. */ class Asset { public: @@ -20,13 +20,21 @@ public: Asset(const std::string & src); public: - //! Get an input stream to the contents of this resource - const std::istream & read(); - //! Get the canonical path to this resource - const char * canonical(); + /** + * \brief Get an input stream to the contents of this asset + * \return Input stream with file contents + */ + std::istream & get_stream(); + /** + * \brief Get the canonical path to this asset + * \return Canonical path to this asset + */ + const std::string & get_canonical() const; private: - std::string src; + //! Canonical path to asset + const std::string src; + //! File handle (stream) std::ifstream file; }; |