2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FWebJsonJsonNumber.h
20 * @brief This is the header file for the %JsonNumber class.
22 * This header file contains the declarations of the %JsonNumber class.
23 * This class represents the JSON value of type number.
26 #ifndef _FWEB_JSON_JSON_NUMBER_H_
27 #define _FWEB_JSON_JSON_NUMBER_H_
29 #include <FBaseDouble.h>
30 #include <FWebJsonIJsonValue.h>
32 namespace Tizen { namespace Web { namespace Json
34 class _JsonNumberImpl;
35 }}} // Tizen::Web::Json
37 namespace Tizen { namespace Web { namespace Json
42 * @brief This class represents the JSON value of type number.
46 * @final This class is not intended for extension.
48 * The %JsonNumber class represents the type of the JSON number.
50 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/json_namespace.htm">JSON Guide</a>.
54 class _OSP_EXPORT_ JsonNumber
56 , public Tizen::Base::Double
60 * Initializes this instance of %JsonNumber with the specified parameter.
64 * @param[in] value The value of type @c double
66 JsonNumber(double value = 0.0L);
69 * Initializes this instance of %JsonNumber with the specified parameter.
73 * @param[in] value The value of type integer
75 JsonNumber(int value);
78 * Copying of objects using this copy constructor is allowed. @n
79 * This constructor initializes a new instance of the %JsonNumber class with the value from another instance.
83 * @param[in] value An instance of %JsonNumber
85 JsonNumber(const JsonNumber& value);
88 * This destructor overrides Tizen::Base::Object::~Object().
92 virtual ~JsonNumber(void);
95 * Gets the type of JSON number.
99 * @return The type of JSON number
101 JsonType GetType(void) const;
104 * Copying of objects using this copy assignment operator is allowed.
108 * @param[in] rhs An instance of %JsonNumber
110 JsonNumber& operator =(const JsonNumber& rhs);
113 _JsonNumberImpl* __pJsonNumberImpl;
115 friend class _JsonNumberImpl;
118 }}} // Tizen::Web::Json
119 #endif // _FWEB_JSON_JSON_NUMBER_H_