MyGUI  3.2.0
MyGUI_ResourceImageSet.h
Go to the documentation of this file.
1 
6 /*
7  This file is part of MyGUI.
8 
9  MyGUI is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  MyGUI is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_RESOURCE_IMAGE_SET_H__
23 #define __MYGUI_RESOURCE_IMAGE_SET_H__
24 
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Macros.h"
27 #include "MyGUI_XmlDocument.h"
28 #include "MyGUI_IResource.h"
29 #include "MyGUI_ImageInfo.h"
30 #include "MyGUI_Enumerator.h"
31 #include "MyGUI_ResourceManager.h"
32 #include "MyGUI_GenericFactory.h"
34 
35 namespace MyGUI
36 {
37 
40 
42  public IResource
43  {
45 
47 
48  public:
49  ImageIndexInfo getIndexInfo(const std::string& _group, const std::string& _index);
50  ImageIndexInfo getIndexInfo(size_t _group, const std::string& _index);
51  ImageIndexInfo getIndexInfo(const std::string& _group, size_t _index);
52  ImageIndexInfo getIndexInfo(size_t _group, size_t _index);
53  ImageIndexInfo getIndexInfo(const IntSize& _group, size_t _index);
54  ImageIndexInfo getIndexInfo(const IntSize& _group, const std::string& _index);
55 
57  EnumeratorGroupImage getEnumerator() const;
58 
59  private:
61  virtual ~ResourceImageSet();
62 
63  virtual void deserialization(xml::ElementPtr _node, Version _version);
64 
65  size_t getGroupIndex(const std::string& _name);
66  size_t getGroupIndex(const IntSize& _size);
67  size_t getImageIndex(GroupImage& _group, const std::string& _name);
68  const IntSize& getGroupSize(size_t _index);
69  const IntSize& getGroupSize(const std::string& _group);
70 
71  private:
72  VectorGroupImage mGroups;
73 
74  static std::vector<IntPoint> mFramesEmpty;
75  };
76 
77 } // namespace MyGUI
78 
79 #endif // __MYGUI_RESOURCE_IMAGE_SET_H__