diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 14:51:02 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 14:51:02 +0100 |
commit | 202725f481e64c4d95e370102ab93d4f8cf4af93 (patch) | |
tree | 18c1fccce5369e89b25c9167718707818f16dcfa /src/crepe/Asset.h | |
parent | 1df510f4a2dbe0fcb8c9f8a34695abf8d33f9ddc (diff) |
incorporate feedback on #26
Diffstat (limited to 'src/crepe/Asset.h')
-rw-r--r-- | src/crepe/Asset.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/crepe/Asset.h b/src/crepe/Asset.h index 0cb5834..cb413f4 100644 --- a/src/crepe/Asset.h +++ b/src/crepe/Asset.h @@ -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; }; |