a4bad290ee5489ff1dffbdd2ba94db2095ffdf35
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / CategoryId.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 CATEGORYID_H_
19 #define CATEGORYID_H_
20
21 #include "common/HereMaps_global.h"
22
23 #ifdef TIZEN_MIGRATION
24 namespace Here { namespace PlugIn { //for plug-in
25 class HerePlace;
26 }}
27 #endif
28
29 HERE_MAPS_BEGIN_NAMESPACE
30
31 /**
32  * This class represents a (Place of Interest or POI) category identifier.
33  * \ingroup Finder
34  */
35 class EXPORT_API CategoryId
36 {
37 public:
38
39     /** 
40      * This method is the destructor. 
41      */
42     virtual ~CategoryId( );
43
44    /**
45     * This method checks if the given instance of <code>CategoryId</code> is
46     * valid. An instance of this class is valid if its id element is not empty.  
47     * 
48     * @return <code>true</code> if the instance is valid, otherwise
49     *        <code>false</code>.
50     */
51     bool IsValid( ) const;
52
53     /**
54      * This method obtains a string representation of the given instance.
55      * 
56      * @return A Unicode string containing a string representation of the given
57      *        instance of <code>CategoryId</code>.
58      */
59     String ToString( ) const;
60
61     /**
62      * This method obtains an invalid category id object.
63      * 
64      * @return A constant reference to an invalid category id object.
65      */
66     static const CategoryId& GetInvalidCategoryId( );
67
68     /**
69      * This method obtains the id of the root category from the given instance.
70      * 
71      * @return A constant reference to an instance of the class representing the
72      *        root category id.
73      */
74     static const CategoryId& GetRootCategoryId( );
75
76     // Factory methods for category filters
77     /**
78      * This factory method obtains a category id object representing the
79      * eat-drink category. 
80      * 
81      * @return A constant reference to an instance of the class representing the
82      *        eat-drink category id.
83      */
84     static const CategoryId& GetEatDrinkCategoryId();
85
86     /**
87      * This factory method obtains a category id object representing the
88      * going-out category. 
89      * 
90      * @return A constant reference to an instance of the class representing the
91      *        going-out category id.
92      */
93     static const CategoryId& GetGoingOutCategoryId();
94
95     /**
96      * This factory method obtains a category id object representing the
97      * sights-museums category. 
98      * 
99      * @return A constant reference to an instance of the class representing the
100      *        sights-museums category id.
101      */
102     static const CategoryId& GetSightsMuseumsCategoryId();
103
104     /**
105      * This factory method obtains a category id object representing the
106      * transport category. 
107      * 
108      * @return A constant reference to an instance of the class representing the
109      *        transport category id.
110      */
111     static const CategoryId& GetTransportCategoryId();
112
113     /**
114      * This factory method obtains a category id object representing the
115      * accommodation category. 
116      * 
117      * @return A constant reference to an instance of the class representing the
118      *        accommodation category id.
119      */
120     static const CategoryId& GetAccommodationCategoryId();
121
122     /**
123      * This factory method obtains a category id object representing the
124      * shopping category. 
125      * 
126      * @return A constant reference to an instance of the class representing the
127      *        shopping category id.
128      */
129     static const CategoryId& GetShoppingCategoryId();
130
131     /**
132      * This factory method obtains a category id object representing the
133      * leisure-outdoor category. 
134      * 
135      * @return A constant reference to an instance of the class representing the
136      *        leisure-outdoor category id.
137      */
138     static const CategoryId& GetLeisureOutdoorCategoryId();
139
140     /**
141      * This factory method obtains a category id object representing the
142      * administrative-areas-buildings category. 
143      * 
144      * @return A constant reference to an instance of the class representing the
145      *        administrative-areas-buildings category id.
146      */
147     static const CategoryId& GetAdministrativeAreasBuildingsCategoryId();
148
149     /**
150      * This factory method obtains a category id object representing the
151      * natural-geographical category. 
152      * 
153      * @return A constant reference to an instance of the class representing the
154      *        natural-geographical category id.
155      */
156     static const CategoryId& GetNaturalGeographicalCategoryId();
157
158 private:
159     CategoryId(const CategoryId&);
160     CategoryId& operator=(const CategoryId&);
161
162     /** Create an invalid instance */
163     CategoryId( const String& id);
164
165 private:
166     class CategoryIdImpl;
167     CategoryIdImpl* m_pImpl;
168
169     friend class JsonParser;
170     friend class Category;
171     friend class TestCategoryId;
172 #ifdef TIZEN_MIGRATION
173     friend class Here::PlugIn::HerePlace; //for plug-in
174 #endif
175 };
176
177
178 HERE_MAPS_END_NAMESPACE
179
180 #endif // CATEGORYID_H_