HoverRace  2.0
Public Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Display::AvatarTextureRes Class Reference

An avatar resource. More...

#include <AvatarTextureRes.h>

+ Inheritance diagram for HoverRace::Display::AvatarTextureRes:

Public Member Functions

 AvatarTextureRes (const std::string &avatarId)
 
virtual ~AvatarTextureRes ()
 
std::string GetId () const override
 Retrieve the ID for this resource. More...
 
std::unique_ptr< std::istream > Open () const override
 Open the stream for reading. More...
 
AvatarTextureResoperator= (const AvatarTextureRes &)=delete
 
- Public Member Functions inherited from HoverRace::Display::Res< Texture >
virtual ~Res ()
 
virtual const ImageData * GetImageData ()
 If IsGenerated() is true, returns the image data necessary to create the texture. More...
 
virtual bool IsGenerated () const
 Check if this texture is generated from memory rather than an input stream. More...
 
- Public Member Functions inherited from HoverRace::Display::BaseRes
virtual ~BaseRes ()
 

Private Types

typedef Res< TextureSUPER
 

Private Attributes

const std::string avatarId
 
const std::string id
 

Detailed Description

An avatar resource.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Display::AvatarTextureRes::AvatarTextureRes ( const std::string &  avatarId)
virtual HoverRace::Display::AvatarTextureRes::~AvatarTextureRes ( )
inlinevirtual

Member Function Documentation

std::string HoverRace::Display::AvatarTextureRes::GetId ( ) const
inlineoverridevirtual

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).

Returns
The identifier.

Implements HoverRace::Display::BaseRes.

std::unique_ptr< std::istream > HoverRace::Display::AvatarTextureRes::Open ( ) const
overridevirtual

Open the stream for reading.

Returns
The input stream.
Exceptions
ResourceLoadExn

Implements HoverRace::Display::BaseRes.

AvatarTextureRes& HoverRace::Display::AvatarTextureRes::operator= ( const AvatarTextureRes )
delete

Member Data Documentation

const std::string HoverRace::Display::AvatarTextureRes::avatarId
private
const std::string HoverRace::Display::AvatarTextureRes::id
private

The documentation for this class was generated from the following files: