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
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.
21 #include "common/HereMaps_global.h"
25 HERE_MAPS_BEGIN_NAMESPACE
28 class GeoCoderReplyParser;
31 * This class is the base class for classes that encapsulate error conditions,
32 * for example <code>CommunicationError</code>.
34 class EXPORT_API ErrorBase
38 * This enumeration defines identifiers for error categories.
42 EC_None = 0, ///< Indicates success.
43 EC_CommunicationsError, ///< Indicates a communications error.
44 EC_ParserError, ///< Indicates a parser error.
45 EC_RouterError, ///< Indicates a router error.
46 EC_TileMapError, ///< Indicates a tile map error.
47 EC_FinderError ///< Indicates a finder/places error.
51 * This method is the (virtual) destructor.
56 * This method produces a string representation of the given instance of
57 * the class. The method must be implemented by derived classes.
59 * @return A string containing a text representation of the given instance
62 virtual String ToString() const = 0;
65 * This method prints the text representation of the given instance of the
66 * class to the stream identified by the caller.
70 * @param rSink A reference to the steam to which to output the (text
71 * representeation) of the given instance.
73 void Print(std::ostream& rSink) const;
76 * This method retrieves a value representing the error category assigned to
77 * the given instance of the class.
79 * @return A value representing the error category assigned to
80 * the given instance of the class.
82 ErrorCategory GetErrorCategory() const;
86 * This method is the default constructor.
91 * This method sets the error category for the given instance of the class.
93 * @param aErrorCategory A value representing the error category to be
94 * assigned to the given instance of the class.
96 void SetErrorCategory(ErrorCategory aErrorCategory);
99 // HERE_MAPS_NO_COPY_NO_ASSIGN(ErrorBase);
101 friend class BaseReply;
102 friend class GeoCoderReplyParser;
103 friend class GeoRouterReplyParser;
104 friend class JsonParser;
105 friend class TestErrorBase;
109 * \brief note ownership of parameter is transferred
110 * \param rError error that is appended to linked list of error - must be allocated on heap
112 void Append(ErrorBase& rError);
115 ErrorBaseImpl* m_pImpl;
118 HERE_MAPS_END_NAMESPACE