diff options
| author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-18 15:08:31 +0100 | 
|---|---|---|
| committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-18 15:08:31 +0100 | 
| commit | fee42c67918a9370f7f4e074dba9a677afccf90b (patch) | |
| tree | c5ed200e3c584fafc4c6bd3df48adeed3cfbd31d /src/crepe/Asset.h | |
| parent | ed1403aea4412bd479244eae8e2940190e71cd28 (diff) | |
| parent | 121b64b1cb6cfead5814070c8b0185d3d7308095 (diff) | |
Merge remote-tracking branch 'origin/master' into niels/RenderingParticle
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;  }; |