source:
dev/trunk/ab5.0/abdev/ab_common/include/ResourceManager/ResourceManager.h@
829
Last change on this file since 829 was 829, checked in by , 12 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[829] | 1 | #pragma once |
2 | ||
3 | namespace ActiveBasic{ namespace Common{ | |
4 | ||
5 | ||
6 | struct ResourceItem | |
7 | { | |
8 | std::string idName; | |
9 | std::string filepath; | |
10 | ||
11 | // IDEのみで使う | |
12 | HTREEITEM hTreeItem; | |
13 | ||
14 | ResourceItem() | |
15 | : idName() | |
16 | , filepath() | |
17 | , hTreeItem() {} | |
18 | ||
19 | ResourceItem(ResourceItem&& y) | |
20 | : idName(std::move(y.idName)) | |
21 | , filepath(std::move(y.filepath)) | |
22 | , hTreeItem(std::move(y.hTreeItem)) {} | |
23 | ||
24 | ResourceItem(ResourceItem const& y) | |
25 | : idName(y.idName) | |
26 | , filepath(y.filepath) | |
27 | , hTreeItem(y.hTreeItem) {} | |
28 | ||
29 | ResourceItem& operator =(ResourceItem&& y) | |
30 | { | |
31 | idName = std::move(y.idName); | |
32 | filepath= std::move(y.filepath); | |
33 | hTreeItem = std::move(y.hTreeItem); | |
34 | return *this; | |
35 | } | |
36 | ||
37 | ResourceItem& operator =(ResourceItem const& y) | |
38 | { | |
39 | return *this = std::move(ResourceItem(y)); | |
40 | } | |
41 | }; | |
42 | ||
43 | typedef std::vector<ResourceItem> ResourceItems; | |
44 | ||
45 | ||
46 | class ResourceManager | |
47 | { | |
48 | public: | |
49 | ResourceManager() {} | |
50 | ||
51 | void Clear(); | |
52 | bool Load( const std::string &resourceFilePath ); | |
53 | bool Save( const std::string &resourceFilePath ); | |
54 | ||
55 | bool HasManifest() const; | |
56 | ||
57 | ResourceItems cursorResources; | |
58 | ResourceItems bitmapResources; | |
59 | ResourceItems iconResources; | |
60 | std::string manifestFilePath; | |
61 | ||
62 | private: | |
63 | ResourceManager(ResourceManager const&); | |
64 | ResourceManager operator =(ResourceManager const&); | |
65 | }; | |
66 | ||
67 | ||
68 | }} |
Note:
See TracBrowser
for help on using the repository browser.