tmxparser  2.1.0
 All Classes Functions Variables Pages
TmxImageLayer.h
1 //-----------------------------------------------------------------------------
2 // Copyright (c) 2010-2014, Tamir Atias
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 // DISCLAIMED. IN NO EVENT SHALL TAMIR ATIAS BE LIABLE FOR ANY
17 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 //-----------------------------------------------------------------------------
24 #pragma once
25 
26 #include <string>
27 #include <vector>
28 
29 #include "TmxLayer.h"
30 #include "TmxPropertySet.h"
31 
32 namespace Tmx
33 {
34  class Map;
35  class Image;
36 
37  //-------------------------------------------------------------------------
40  //-------------------------------------------------------------------------
41  class ImageLayer : public Tmx::Layer
42  {
43  public:
45  ImageLayer(const Tmx::Map *_map);
46  ~ImageLayer();
47 
49  void Parse(const tinyxml2::XMLNode *imageLayerNode);
50 
53  const Tmx::Image* GetImage() const { return image; }
54 
55  private:
56  Tmx::Image* image;
57  };
58 }
Base class for other layer types.
Definition: TmxLayer.h:54
const Tmx::Image * GetImage() const
Returns a variable containing information about the image of the ImageLayer.
Definition: TmxImageLayer.h:53
ImageLayer(const Tmx::Map *_map)
Construct an ImageLayer on the given map.
Definition: TmxImageLayer.cpp:37
void Parse(const tinyxml2::XMLNode *imageLayerNode)
Parse a ImageLayer element.
Definition: TmxImageLayer.cpp:48
This class is the root class of the parser.
Definition: TmxMap.h:115
A class used for holding information about a background image.
Definition: TmxImageLayer.h:41
A class used for storing information about an image within a tileset.
Definition: TmxImage.h:42