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 FWebJsonJsonNull.h
20 * @brief This is the header file for the %JsonNull class.
22 * This header file contains the declarations of the %JsonNull class.
23 * This class represents the JSON value of type @c null.
25 #ifndef _FWEB_JSON_JSON_NULL_H_
26 #define _FWEB_JSON_JSON_NULL_H_
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FWebJsonIJsonValue.h>
32 namespace Tizen { namespace Web { namespace Json
35 }}} // Tizen::Web::Json
37 namespace Tizen { namespace Web { namespace Json
42 * @brief This class represents the JSON value of type @c null.
46 * @final This class is not intended for extension.
48 * The %JsonNull class represents the JSON value of type @c null.
50 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/json_namespace.htm">JSON Guide</a>.
53 class _OSP_EXPORT_ JsonNull
55 , public Tizen::Base::Object
59 * This is the default constructor for this class.
66 * Copying of objects using this copy constructor is allowed. @n
67 * Initializes a new instance of %JsonNull to the specified @c value.
71 * @param[in] value An instance of %JsonNull
73 JsonNull(const JsonNull& value);
76 * This destructor overrides Tizen::Base::Object::~Object().
80 virtual ~JsonNull(void);
83 * Checks whether the value of the specified instance equals the value of the current instance.
87 * @return @c true if the value of the current instance equals the value of the specified instance, @n
89 * @param[in] obj The object to compare with the current instance of %JsonNull @n
90 * This method returns @c false if the specified object is not %JsonNull.
91 * @see Tizen::Base::Object::Equals()
93 virtual bool Equals(const Object& obj) const;
96 * Gets the hash value of the current instance.
100 * @return An integer value indicating the hash value of the current instance
101 * @remarks The two equal instances must return the same hash value. For better performance,
102 * the used hash function must generate a random distribution for all inputs. @n
103 * The default implementation of this method returns the address of the current instance.
105 virtual int GetHashCode(void) const;
108 * Gets the type of the object (always @c JSON_NULL).
112 * @return The JSON type
114 JsonType GetType(void) const;
117 * Converts the value of the calling object from %JsonNull to a string.
121 * @return A string representing the value of the current instance
123 Tizen::Base::String ToString(void) const;
126 * Assigns the value of the specified instance of %JsonNull to the current instance of %JsonNull.
130 * @param[in] rhs An instance of %JsonNull
132 JsonNull& operator =(const JsonNull& rhs);
135 * Checks whether the values of the two %JsonNull objects are equal.
139 * @return @c true if the values of the objects are equal, @n
141 * @param[in] rhs A %JsonNull instance to compare with the current instance
143 bool operator ==(const JsonNull& rhs) const;
147 * Checks whether the values of the two %JsonNull objects are not equal.
151 * @return @c true if the values of the objects are not equal, @n
153 * @param[in] rhs A %JsonNull instance to compare with the current instance
155 bool operator !=(const JsonNull& rhs) const;
158 _JsonNullImpl* __pJsonNullImpl;
160 friend class _JsonNullImpl;
163 }}} // Tizen::Web::Json
164 #endif // _FWEB_JSON_JSON_NULL_H_