|
HoverRace
2.0
|
#include <Res.h>
Inheritance diagram for HoverRace::Display::BaseRes:Public Member Functions | |
| virtual | ~BaseRes () |
| virtual std::string | GetId () const =0 |
| Retrieve the ID for this resource. More... | |
| virtual std::unique_ptr< std::istream > | Open () const =0 |
| Open the stream for reading. More... | |
|
inlinevirtual |
|
pure virtual |
Retrieve the ID for this resource.
The ID should be unique for every resource being pointed at, so two instances that point to the same resource (e.g. a file) should return the same ID.
This allows loaded resources to be cached, so if two instances point to, say, the same file, then the resource will be loaded once (although this is left as an exercise for the Display).
Implemented in HoverRace::Display::MediaRes< T >, HoverRace::Display::SpriteTextureRes, and HoverRace::Display::AvatarTextureRes.
|
pure virtual |
Open the stream for reading.
| ResourceLoadExn |
Implemented in HoverRace::Display::MediaRes< T >, HoverRace::Display::SpriteTextureRes, and HoverRace::Display::AvatarTextureRes.
1.8.11