HoverRace  2.0
AvatarTextureRes.h
Go to the documentation of this file.
1 
2 // AvatarTextureRes.h
3 //
4 // Copyright (c) 2014 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "Res.h"
25 
26 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
27 # ifdef MR_ENGINE
28 # define MR_DllDeclare __declspec( dllexport )
29 # else
30 # define MR_DllDeclare __declspec( dllimport )
31 # endif
32 #else
33 # define MR_DllDeclare
34 #endif
35 
36 namespace HoverRace {
37  namespace Display {
38  class Texture;
39  }
40 }
41 
42 namespace HoverRace {
43 namespace Display {
44 
49 class MR_DllDeclare AvatarTextureRes : public Res<Texture>
50 {
52 
53 public:
54  AvatarTextureRes(const std::string &avatarId);
55  virtual ~AvatarTextureRes() { }
56 
57  AvatarTextureRes &operator=(const AvatarTextureRes&) = delete;
58 
59 public:
60  std::string GetId() const override { return id; }
61 
62  std::unique_ptr<std::istream> Open() const override;
63 
64 private:
65  const std::string avatarId;
66  const std::string id;
67 };
68 
69 } // namespace Display
70 } // namespace HoverRace
71 
72 #undef MR_DllDeclare
#define MR_DllDeclare
Definition: AvatarTextureRes.h:33
Base class for loadable textures.
Definition: Res.h:94
const std::string id
Definition: AvatarTextureRes.h:66
std::string GetId() const override
Retrieve the ID for this resource.
Definition: AvatarTextureRes.h:60
const std::string avatarId
Definition: AvatarTextureRes.h:65
An avatar resource.
Definition: AvatarTextureRes.h:49
Base class for loadable resources.
Definition: Res.h:83
Res< Texture > SUPER
Definition: AvatarTextureRes.h:51
Definition: Announcement.h:24
virtual ~AvatarTextureRes()
Definition: AvatarTextureRes.h:55