2 // Open Service Platform
3 // Copyright (c) 2012-2013 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.
20 * @brief This is the header file for the %Variant class.
22 * This header file contains the declarations of the %Variant class.
24 #ifndef _FUI_VARIANT_H_
25 #define _FUI_VARIANT_H_
27 #include <FBaseDataType.h>
28 #include <FBaseObject.h>
30 namespace Tizen { namespace Base
35 namespace Tizen { namespace Graphics
49 namespace Tizen { namespace Ui
57 * Defines the types which %Variant can hold.
63 VARIANT_TYPE_NONE = 0, /**< The type for invalid variant */
64 VARIANT_TYPE_INT, /**< The @c int type */
65 VARIANT_TYPE_UINT, /**< The @c unsigned @c int type */
66 VARIANT_TYPE_BOOL, /**< The @c bool type */
67 VARIANT_TYPE_FLOAT, /**< The @c float type */
68 VARIANT_TYPE_DOUBLE, /**< The @c double type */
69 VARIANT_TYPE_LONG, /**< The @c long type */
70 VARIANT_TYPE_ULONG, /**< The @c unsigned @c long type */
71 VARIANT_TYPE_LONGLONG, /**< The @c long @c long type */
72 VARIANT_TYPE_ULONGLONG, /**< The @c unsigned @c long @c long type */
73 VARIANT_TYPE_STRING, /**< The String type */
74 VARIANT_TYPE_DATETIME, /**< The DateTime type */
75 VARIANT_TYPE_COLOR, /**< The Color type */
76 VARIANT_TYPE_POINT, /**< The Point type */
77 VARIANT_TYPE_FLOAT_POINT, /**< The FloatPoint type */
78 VARIANT_TYPE_RECTANGLE, /**< The Rectangle type */
79 VARIANT_TYPE_FLOAT_RECTANGLE, /**< The FloatRectangle type */
80 VARIANT_TYPE_DIMENSION, /**< The Dimension type */
81 VARIANT_TYPE_FLOAT_DIMENSION, /**< The FloatDimension type */
82 VARIANT_TYPE_FLOAT_MATRIX4, /**< The FloatMatrix4 type */
83 VARIANT_TYPE_FLOAT_POINT3, /**< The FloatPoint3 type @b Since: @b 2.1 */
84 VARIANT_TYPE_FLOAT_VECTOR4 /**< The FloatPoint3 type @b Since: @b 2.1 */
89 * @brief This class abstracts a %Variant value.
93 * The %Variant class represents a %Variant type which can hold any of the basic type values.
96 class _OSP_EXPORT_ Variant
97 : public Tizen::Base::Object
101 * This is the default constructor for this class.
108 * This is the copy constructor for the %Variant class.
112 * @param[in] value A reference to the %Variant instance to copy
114 Variant(const Variant& value);
117 * Initializes this instance of %Variant with the specified @c int value.
121 * @param[in] value An @c int value
126 * Initializes this instance of %Variant with the specified @c unsigned @c int value.
130 * @param[in] value An @c unsigned @c int value
132 Variant(unsigned int value);
135 * Initializes this instance of %Variant with the specified bool value.
139 * @param[in] value A bool value
144 * Initializes this instance of %Variant with the specified @c float value.
148 * @param[in] value A @c float value
150 Variant(float value);
153 * Initializes this instance of %Variant with the specified @c double value.
157 * @param[in] value A @c double value
159 Variant(double value);
162 * Initializes this instance of %Variant with the specified @c long value.
166 * @param[in] value A @c long value
171 * Initializes this instance of %Variant with the specified @c unsigned @c long value.
175 * @param[in] value An @c unsigned @c long value
177 Variant(unsigned long value);
180 * Initializes this instance of %Variant with the specified @c long @c long value.
184 * @param[in] value A @c long @c long value
186 Variant(long long value);
189 * Initializes this instance of %Variant with the specified @c unsigned @c long @c long value.
193 * @param[in] value An @c unsigned @c long @c long value
195 Variant(unsigned long long value);
198 * Initializes this instance of %Variant with the specified array of characters.
202 * @param[in] pValue An array of characters value
204 Variant(const char* pValue);
207 * Initializes this instance of %Variant with the specified array of Unicode characters.
211 * @param[in] pValue An array of Unicode characters value
213 Variant(const wchar_t* pValue);
216 * Initializes this instance of %Variant with the specified Tizen::Base::String value.
220 * @param[in] value A Tizen::Base::String value
222 Variant(const Tizen::Base::String& value);
225 * Initializes this instance of %Variant with the specified Tizen::Base::DateTime value.
229 * @param[in] value A Tizen::Base::DateTime value
231 Variant(const Tizen::Base::DateTime& value);
234 * Initializes this instance of %Variant with the specified Tizen::Graphics::Color value.
238 * @param[in] value A Tizen::Graphics::Color value
240 Variant(const Tizen::Graphics::Color& value);
243 * Initializes this instance of %Variant with the specified Tizen::Graphics::Point value.
247 * @param[in] value A Tizen::Graphics::Point value
249 Variant(const Tizen::Graphics::Point& value);
252 * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatPoint value.
256 * @param[in] value A Tizen::Graphics::FloatPoint value
258 Variant(const Tizen::Graphics::FloatPoint& value);
261 * Initializes this instance of %Variant with the specified Tizen::Graphics::Rectangle value.
265 * @param[in] value A Tizen::Graphics::Rectangle value
267 Variant(const Tizen::Graphics::Rectangle& value);
270 * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatRectangle value.
274 * @param[in] value A Tizen::Graphics::FloatRectangle value
276 Variant(const Tizen::Graphics::FloatRectangle& value);
279 * Initializes this instance of %Variant with the specified Tizen::Graphics::Dimension value.
283 * @param[in] value A Tizen::Graphics::Dimension value
285 Variant(const Tizen::Graphics::Dimension& value);
288 * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatDimension value.
292 * @param[in] value A Tizen::Graphics::FloatDimension value
294 Variant(const Tizen::Graphics::FloatDimension& value);
297 * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatMatrix4 value.
301 * @param[in] value A Tizen::Graphics::FloatMatrix4 value
303 Variant(const Tizen::Graphics::FloatMatrix4& value);
306 * Initializes this instance of %Variant with a specified Tizen::Graphics::FloatPoint3 value.
310 * @param[in] value A Tizen::Graphics::FloatPoint3 value
312 Variant(const Tizen::Graphics::FloatPoint3& value);
315 * Initializes this instance of %Variant with a specified Tizen::Graphics::FloatVector4 value.
319 * @param[in] value A Tizen::Graphics::FloatVector4 value
321 Variant(const Tizen::Graphics::FloatVector4& value);
324 * This is the destructor for this class.
328 virtual ~Variant(void);
331 * Assigns the value of the specified instance to the current instance of %Variant.
335 * @return A reference to the %Variant instance
336 * @param[in] rhs An instance of %Variant to copy
338 Variant& operator =(const Variant& rhs);
341 * Assigns the value to the current instance of %Variant.
345 * @return A reference to the %Variant instance
346 * @param[in] rhs An @c int value
348 Variant& operator =(int rhs);
351 * Assigns the value to the current instance of %Variant.
355 * @return A reference to the %Variant instance
356 * @param[in] rhs An @c unsigned @c int value
359 Variant& operator =(unsigned int rhs);
362 * Assigns the value to the current instance of %Variant.
365 * @return A reference to the %Variant instance
366 * @param[in] rhs A @c bool value
369 Variant& operator =(bool rhs);
372 * Assigns the value to the current instance of %Variant.
376 * @return A reference to the %Variant instance
377 * @param[in] rhs A @c float value
380 Variant& operator =(float rhs);
383 * Assigns the value to the current instance of %Variant.
387 * @return A reference to the %Variant instance
388 * @param[in] rhs A @c double value
391 Variant& operator =(double rhs);
394 * Assigns the value to the current instance of %Variant.
398 * @return A reference to the %Variant instance
399 * @param[in] rhs A @c long value
402 Variant& operator =(long rhs);
405 * Assigns the value to the current instance of %Variant.
409 * @return A reference to the %Variant instance
410 * @param[in] rhs An @c unsigned @c long value
413 Variant& operator =(unsigned long rhs);
416 * Assigns the value to the current instance of %Variant.
420 * @return A reference to the %Variant instance
421 * @param[in] rhs A @c long @c long value
424 Variant& operator =(long long rhs);
427 * Assigns the value to the current instance of %Variant.
430 * @return A reference to the %Variant instance
431 * @param[in] rhs An @c unsigned @c long @c long value
434 Variant& operator =(unsigned long long rhs);
437 * Assigns the value of the pointer to the current instance of %Variant.
441 * @return A reference to the %Variant instance
442 * @param[in] pRhs A pointer to an array of characters
445 Variant& operator =(const char* pRhs);
448 * Assigns the value of the pointer to the current instance of %Variant.
452 * @return A reference to the %Variant instance
453 * @param[in] pRhs A pointer to an array of Unicode characters
456 Variant& operator =(const wchar_t* pRhs);
459 * Assigns the value of the specified instance of Tizen::Base::String to the current instance of %Variant.
463 * @return A reference to the %Variant instance
464 * @param[in] rhs An instance of Tizen::Base::String
466 Variant& operator =(const Tizen::Base::String& rhs);
469 * Assigns the value of the specified instance of Tizen::Base::DateTime to the current instance of %Variant.
473 * @return A reference to the %Variant instance
474 * @param[in] rhs An instance of Tizen::Base::DateTime
476 Variant& operator =(const Tizen::Base::DateTime& rhs);
479 * Assigns the value of the specified instance of Tizen::Graphics::Color to the current instance of %Variant.
482 * @return A reference to the %Variant instance
483 * @param[in] rhs An instance of Tizen::Graphics::Color
485 Variant& operator =(const Tizen::Graphics::Color& rhs);
488 * Assigns the value of the specified instance of Tizen::Graphics::Point to the current instance of %Variant.
491 * @return A reference to the %Variant instance
492 * @param[in] rhs An instance of Tizen::Graphics::Point
494 Variant& operator =(const Tizen::Graphics::Point& rhs);
497 * Assigns the value of the specified instance of Tizen::Graphics::FloatPoint to the current instance of %Variant.
500 * @return A reference to the %Variant instance
501 * @param[in] rhs An instance of Tizen::Graphics::FloatPoint
503 Variant& operator =(const Tizen::Graphics::FloatPoint& rhs);
506 * Assigns the value of the specified instance of Tizen::Graphics::Rectangle to the current instance of %Variant.
509 * @return A reference to the %Variant instance
510 * @param[in] rhs An instance of Tizen::Graphics::Rectangle
512 Variant& operator =(const Tizen::Graphics::Rectangle& rhs);
515 * Assigns the value of the specified instance of Tizen::Graphics::FloatRectangle to the current instance of %Variant.
518 * @return A reference to the %Variant instance
519 * @param[in] rhs An instance of Tizen::Graphics::FloatRectangle
521 Variant& operator =(const Tizen::Graphics::FloatRectangle& rhs);
524 * Assigns the value of the specified instance of Tizen::Graphics::Dimension to the current instance of %Variant.
527 * @return A reference to the %Variant instance
528 * @param[in] rhs An instance of Tizen::Graphics::Dimension
530 Variant& operator =(const Tizen::Graphics::Dimension& rhs);
533 * Assigns the value of the specified instance of Tizen::Graphics::FloatDimension to the current instance of %Variant.
536 * @return A reference to the %Variant instance
537 * @param[in] rhs An instance of Tizen::Graphics::FloatDimension
539 Variant& operator =(const Tizen::Graphics::FloatDimension& rhs);
542 * Assigns the value of the specified instance of Tizen::Graphics::FloatMatrix4 to the current instance of %Variant.
545 * @return A reference to the %Variant instance
546 * @param[in] rhs An instance of Tizen::Graphics::FloatMatrix4
548 Variant& operator =(const Tizen::Graphics::FloatMatrix4& rhs);
551 * Assigns the value of a specified instance of Tizen::Graphics::FloatPoint3 to the current instance of %Variant.
554 * @return A reference to the %Variant instance
555 * @param[in] rhs An instance of Tizen::Graphics::FloatPoint3
557 Variant& operator =(const Tizen::Graphics::FloatPoint3& rhs);
560 * Assigns the value of a specified instance of Tizen::Graphics::FloatVecto4 to the current instance of %Variant.
563 * @return A reference to the %Variant instance
564 * @param[in] rhs An instance of Tizen::Graphics::FloatVector4
566 Variant& operator =(const Tizen::Graphics::FloatVector4& rhs);
569 * Checks whether the specified instance and current instance of %Variant have equal values.
572 * @return @c true if the two instances of %Variant are equal, @n
574 * @param[in] lhs An instance of %Variant
575 * @param[in] rhs An instance of %Variant
577 _OSP_EXPORT_ friend bool operator ==(const Variant& lhs, const Variant& rhs);
580 * Checks whether the specified instance and current instance of %Variant have different values.
583 * @return @c true if the values of the two instances of %Variant are not equal, @n
585 * @param[in] lhs An instance of %Variant
586 * @param[in] rhs An instance of %Variant
589 _OSP_EXPORT_ friend bool operator !=(const Variant& lhs, const Variant& rhs);
592 * Gets the @c signed @c int equivalent of the current instance.
596 * @return The @c signed @c int equivalent of the current instance
597 * @exception E_SUCCESS The method is successful.
598 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_INT.
599 * @remarks The specific error code can be accessed using the GetLastResult() method.
600 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_INT.
603 int ToInt(void) const;
606 * Gets the @c unsigned @c int equivalent of the current instance.
610 * @return The @c unsigned @c int equivalent of the current instance
611 * @exception E_SUCCESS The method is successful.
612 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_UINT.
613 * @remarks The specific error code can be accessed using the GetLastResult() method.
614 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_UINT.
617 unsigned int ToUInt(void) const;
620 * Gets the @c bool equivalent of the current instance.
624 * @return The @c bool equivalent of the current instance
625 * @exception E_SUCCESS The method is successful.
626 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_BOOL.
627 * @remarks The specific error code can be accessed using the GetLastResult() method.
628 * The method returns @c false and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_BOOL.
631 bool ToBool(void) const;
634 * Gets the @c float equivalent of the current instance.
638 * @return The @c float equivalent of the current instance
639 * @exception E_SUCCESS The method is successful.
640 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT.
641 * @remarks The specific error code can be accessed using the GetLastResult() method.
642 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT.
645 float ToFloat(void) const;
648 * Gets the @c double equivalent of the current instance.
652 * @return The @c double equivalent of the current instance
653 * @exception E_SUCCESS The method is successful.
654 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DOUBLE.
655 * @remarks The specific error code can be accessed using the GetLastResult() method.
656 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DOUBLE.
659 double ToDouble(void) const;
662 * Gets the @c signed @c long equivalent of the current instance.
666 * @return The @c signed @c long equivalent of the current instance
667 * @exception E_SUCCESS The method is successful.
668 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONG.
669 * @remarks The specific error code can be accessed using the GetLastResult() method.
670 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONG.
673 long ToLong(void) const;
676 * Gets the @c unsigned @c int equivalent of the current instance.
680 * @return The @c unsigned @c long equivalent of the current instance
681 * @exception E_SUCCESS The method is successful.
682 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONG.
683 * @remarks The specific error code can be accessed using the GetLastResult() method.
684 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONG.
687 unsigned long ToULong(void) const;
690 * Gets the @c signed @c long @c long equivalent of the current instance.
694 * @exception E_SUCCESS The method is successful.
695 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_LONGLONG.
697 * @remarks The specific error code can be accessed using the GetLastResult() method.
698 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONGLONG.
701 long long ToLongLong(void) const;
704 * Gets the @c unsigned @c long @c long equivalent of the current instance.
708 * @return The @c unsigned @c long @c long equivalent of the current instance
709 * @exception E_SUCCESS The method is successful.
710 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_ULONGLONG.
711 * @remarks The specific error code can be accessed using the GetLastResult() method.
712 * The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONGLONG.
715 unsigned long long ToULongLong(void) const;
718 * Gets the Tizen::Base::String representation of the value of the current instance.
722 * @return A Tizen::Base::String representing the value of the current instance
723 * @exception E_SUCCESS The method is successful.
724 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_STRING.
725 * @remarks The specific error code can be accessed using the GetLastResult() method.
726 * The method returns String("") and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_STRING.
729 Tizen::Base::String ToString(void) const;
732 * Gets the Tizen::Base::DateTime representation of the value of the current instance.
736 * @return A Tizen::Base::DateTime representing the value of the current instance
737 * @exception E_SUCCESS The method is successful.
738 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DATETIME.
739 * @remarks The specific error code can be accessed using the GetLastResult() method.
740 * The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DATETIME.
743 Tizen::Base::DateTime ToDateTime(void) const;
746 * Gets the Tizen::Graphics::Color representation of the value of the current instance.
750 * @return A Tizen::Graphics::Color representing the value of the current instance
751 * @exception E_SUCCESS The method is successful.
752 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_COLOR.
753 * @remarks The specific error code can be accessed using the GetLastResult() method.
754 * The method returns Color and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_COLOR.
757 Tizen::Graphics::Color ToColor(void) const;
760 * Gets the Tizen::Graphics::Point representation of the value of the current instance.
764 * @return A Tizen::Graphics::Point representing the value of the current instance
765 * @exception E_SUCCESS The method is successful.
766 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_POINT.
767 * @remarks The specific error code can be accessed using the GetLastResult() method.
768 * The method returns Point and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_POINT.
771 Tizen::Graphics::Point ToPoint(void) const;
774 * Gets the Tizen::Graphics::FloatPoint representation of the value of the current instance.
778 * @return A Tizen::Graphics::FloatPoint representing the value of the current instance
779 * @exception E_SUCCESS The method is successful.
780 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT.
781 * @remarks The specific error code can be accessed using the GetLastResult() method.
782 * The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT.
785 Tizen::Graphics::FloatPoint ToFloatPoint(void) const;
788 * Gets the Tizen::Graphics::Rectangle representation of the value of the current instance.
792 * @return A Tizen::Graphics::Rectangle representing the value of the current instance
793 * @exception E_SUCCESS The method is successful.
794 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_RECTANGLE.
795 * @remarks The specific error code can be accessed using the GetLastResult() method.
796 * The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_RECTANGLE.
799 Tizen::Graphics::Rectangle ToRectangle(void) const;
802 * Gets the Tizen::Graphics::FloatRectangle representation of the value of the current instance.
806 * @return A Tizen::Graphics::FloatRectangle representing the value of the current instance
807 * @exception E_SUCCESS The method is successful.
808 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE.
809 * @remarks The specific error code can be accessed using the GetLastResult() method.
810 * The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_RECTANGLE.
813 Tizen::Graphics::FloatRectangle ToFloatRectangle(void) const;
816 * Gets the Tizen::Graphics::Dimension representation of the value of the current instance.
820 * @return A Tizen::Graphics::Dimension representing the value of the current instance
821 * @exception E_SUCCESS The method is successful.
822 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_DIMENSION.
823 * @remarks The specific error code can be accessed using the GetLastResult() method.
824 * The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DIMENSION.
827 Tizen::Graphics::Dimension ToDimension(void) const;
830 * Gets the Tizen::Graphics::FloatDimension representation of the value of the current instance.
834 * @return A Tizen::Graphics::FloatDimension representing the value of the current instance
835 * @exception E_SUCCESS The method is successful.
836 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION.
837 * @remarks The specific error code can be accessed using the GetLastResult() method.
838 * The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_DIMENSION.
841 Tizen::Graphics::FloatDimension ToFloatDimension(void) const;
844 * Gets the Tizen::Graphics::FloatMatrix4 representation of the value of the current instance.
848 * @return A Tizen::Graphics::FloatMatrix4 representing the value of the current instance
849 * @exception E_SUCCESS The method is successful.
850 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_MATRIX4.
851 * @remarks The specific error code can be accessed using the GetLastResult() method.
852 * The method returns FloatMatrix4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_MATRIX4.
855 Tizen::Graphics::FloatMatrix4 ToFloatMatrix4(void) const;
858 * Gets the Tizen::Graphics::FloatPoint3 representation of the value of the current instance.
862 * @return A Tizen::Graphics::FloatPoint3 representing the value of the current instance
863 * @exception E_SUCCESS The method is successful.
864 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_POINT3.
865 * @remarks The specific error code can be accessed using the GetLastResult() method.
866 * The method returns FloatPoint3 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT_POINT3.
869 Tizen::Graphics::FloatPoint3 ToFloatPoint3(void) const;
872 * Gets the Tizen::Graphics::FloatVector4 representation of the value of the current instance.
876 * @return A Tizen::Graphics::FloatVector4 representing the value of the current instance
877 * @exception E_SUCCESS The method is successful.
878 * @exception E_INVALID_OPERATION The current variant type is not @c VARIANT_TYPE_FLOAT_VECTOR4.
879 * @remarks The specific error code can be accessed using the GetLastResult() method.
880 * The method returns FloatVector4() and generates E_INVALID_OPERATION exception if the current variant type is not VARIANT_TYPE_FLOAT_VECTOR4.
883 Tizen::Graphics::FloatVector4 ToFloatVector4(void) const;
886 * Checks whether the variant is empty.
890 * @return @c true if the current instance is NULL_VARIANT, @n
893 bool IsEmpty(void) const;
896 * Gets the type of the variant.
900 * @return The variant type
902 VariantType GetType(void) const;
905 * Checks whether the current instance of %Variant equals the specified instance of %Variant.
909 * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
911 * @param[in] obj An instance of %Variant
912 * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the %Variant to compare the two instances.
914 virtual bool Equals(const Object& obj) const;
917 * Gets the hash value of the current instance.
921 * @return The hash value of the current instance
922 * @remarks Two equal instances must return the same hash value. For better performance, the used hash function must generate a random distribution for all inputs.
924 virtual int GetHashCode(void) const;
928 * A constant represents a @c null value.
932 static const Variant NULL_VARIANT;
935 // This method is for internal use only.
936 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
938 // This method is prohibited. If this method is used in an application, the application can get rejected during
939 // the certification process.
943 const _VariantImpl* GetVariantImpl(void) const;
946 // This method is for internal use only.
947 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
949 // This method is prohibited. If this method is used in an application, the application can get rejected during
950 // the certification process.
954 _VariantImpl* GetVariantImpl(void);
957 _VariantImpl* __pVariantImpl;
962 #endif // _FUI_VARIANT_H_