HoverRace  2.0
ResBundle.h
Go to the documentation of this file.
1 
2 // ResBundle.h
3 //
4 // Copyright (c) 2015 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 "Bundle.h"
25 
26 namespace HoverRace {
27  namespace ObjFacTools {
28  class ResourceLib;
29  }
30 }
31 
32 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
33 # ifdef MR_ENGINE
34 # define MR_DllDeclare __declspec( dllexport )
35 # else
36 # define MR_DllDeclare __declspec( dllimport )
37 # endif
38 #else
39 # define MR_DllDeclare
40 #endif
41 
42 namespace HoverRace {
43 namespace Parcel {
44 
50 {
51  using SUPER = Bundle;
52 
53 public:
54  ResBundle(const Util::OS::path_t &dir,
55  std::shared_ptr<ResBundle> subBundle = std::shared_ptr<ResBundle>());
56  virtual ~ResBundle();
57 
58 public:
59  void FreeResources();
60 
61 public:
62  ObjFacTools::ResourceLib &GetResourceLib() const;
63 
64 private:
65  mutable std::unique_ptr<ObjFacTools::ResourceLib> resourceLib;
66 };
67 
68 } // namespace Parcel
69 } // namespace HoverRace
70 
71 #undef MR_DllDeclare
boost::filesystem::path path_t
Definition: OS.h:57
#define MR_DllDeclare
Definition: ResBundle.h:39
A source of parcels.
Definition: Bundle.h:45
Abstraction for loading resources.
Definition: ResBundle.h:49
std::unique_ptr< ObjFacTools::ResourceLib > resourceLib
Definition: ResBundle.h:65
Definition: Announcement.h:24
Legacy resource manager for ObjFac1.dat resources.
Definition: ResourceLib.h:55