[toolchain upgrade] fixed build errors and warnings in gcc6x mode
[platform/core/location/maps-plugin-here.git] / inc / engine / maps / DrawableBitmap.h
1 /*
2  * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3  * This software, including documentation, is protected by copyright controlled by
4  * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5  * storing, adapting or translating, any or all of this material requires the prior
6  * written consent of HERE Global B.V. You may use this
7  * Software in accordance with the terms and conditions defined in the
8  * HERE Location Platform Services Terms and Conditions, available at
9  * http://developer.here.com/terms-conditions-base
10  *
11  * As an additional permission to the above, you may distribute Software,
12  * in object code format as part of an Application, according to, and subject to, terms and
13  * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14  * You may distribute such object code format Application under terms of your choice,
15  * provided that the header and source files of the Software have not been modified.
16  */
17
18 #ifndef DRAWABLE_BITMAP_H
19 #define DRAWABLE_BITMAP_H
20
21 #include "common/HereMaps_global.h"
22 #ifdef TIZEN_MIGRATION
23 #include "graphic/Bitmap.h"
24 #else
25 #include <FGraphics.h>
26 #endif
27
28 #include <tr1/memory>
29
30 HERE_MAPS_BEGIN_NAMESPACE
31
32 /**
33  * This class encapsulates a bitmap that can be drawn on the map.
34  */
35 class DrawableBitmap
36 {
37 public:
38     /**
39      * This typedef defines a rendering handle as a type.
40      */
41     typedef UInt RenderHandle;
42
43     /**
44      * This is a copy constructor. It creates a new instance of the class, using
45      * an existing bitmap.
46      * 
47      * @param bitmap A pointer to an existing bitmap.
48      */
49 #ifdef TIZEN_CFG_CPP11_UNIQUE_PTR
50     DrawableBitmap(std::unique_ptr<Tizen::Maps::Bitmap>& bitmap);
51 #else
52     DrawableBitmap(std::auto_ptr<Tizen::Graphics::Bitmap>& bitmap);
53 #endif
54     /**
55      * This is the destructor.
56      */
57     ~DrawableBitmap();
58
59     /**
60      * This method retrieves a pointer to the bitmap encapsulated in the given
61      * instance of the class.
62      */
63 #ifdef TIZEN_MIGRATION
64     Tizen::Maps::Bitmap* GetBitmap() const;
65 #else
66     Tizen::Graphics::Bitmap* GetBitmap() const;
67 #endif
68     /**
69      * This method sets the rendering handle.
70      *
71      * @param aRenderHandle A value representing the rendering handle to set.
72      */
73     void SetRenderHandle(RenderHandle aRenderHandle);
74
75     /**
76      * This method retrieves the rendering handle.
77      * 
78      * @return A value representing the rendering handle to set.
79      */
80     RenderHandle GetRenderHandle() const;
81
82     /**
83      * This method resets the rendering handle on the given object.
84      */
85     void ResetRenderHandle();
86
87 private:
88     HERE_MAPS_NO_COPY_NO_ASSIGN(DrawableBitmap);
89
90     class DrawableBitmapImpl;
91     DrawableBitmapImpl* m_pImpl;
92 };
93
94 typedef std::tr1::shared_ptr<DrawableBitmap> DrawableBitmapPtr;
95
96 HERE_MAPS_END_NAMESPACE
97
98 #endif