HoverRace  2.0
SpriteHandle.h
Go to the documentation of this file.
1 
2 // SpriteHandle.h
3 //
4 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
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 
23 // The class defined in this file can be used as a base class for
24 // Sprites
25 //
26 //
27 
28 #pragma once
29 
30 #include "../Exception.h"
31 #include "ResourceLib.h"
32 
33 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
34 # ifdef MR_ENGINE
35 # define MR_DllDeclare __declspec( dllexport )
36 # else
37 # define MR_DllDeclare __declspec( dllimport )
38 # endif
39 #else
40 # define MR_DllDeclare
41 #endif
42 
43 namespace HoverRace {
44 namespace ObjFac1 {
45 
47 {
49 
50 public:
52  const ObjFacTools::ResSprite *pSprite) :
53  SUPER(pId), mSprite(pSprite) { }
54  virtual ~SpriteHandle() { }
55 
56 public:
57  const VideoServices::Sprite *GetSprite() const { return mSprite; }
58 
59 public:
60  void Serialize(Parcel::ObjStream&) override
61  {
62  throw UnimplementedExn("SpriteHandle::Serialize()");
63  }
64 
65 protected:
67 };
68 
69 } // namespace ObjFac1
70 } // namespace HoverRace
71 
72 #undef MR_DllDeclare
Unique identifier for a Factory Object.
Definition: DllObjectFactory.h:54
virtual ~SpriteHandle()
Definition: SpriteHandle.h:54
Definition: Sprite.h:47
void Serialize(Parcel::ObjStream &) override
Definition: SpriteHandle.h:60
Definition: ResSprite.h:40
Base class for parcel serializers.
Definition: ObjStream.h:58
SpriteHandle(const Util::ObjectFromFactoryId &pId, const ObjFacTools::ResSprite *pSprite)
Definition: SpriteHandle.h:51
#define MR_DllDeclare
Definition: SpriteHandle.h:40
const ObjFacTools::ResSprite * mSprite
Definition: SpriteHandle.h:66
Exception indicating an unimplemented bit of code has been hit.
Definition: Exception.h:65
Base class for object created with a Dll Factory.
Definition: DllObjectFactory.h:86
Definition: SpriteHandle.h:46
Definition: Announcement.h:24
const VideoServices::Sprite * GetSprite() const
Definition: SpriteHandle.h:57