Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiVariant.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file                FUiVariant.h
20  * @brief               This is the header file for the %Variant class.
21  *
22  * This header file contains the declarations of the %Variant class.
23  */
24 #ifndef _FUI_VARIANT_H_
25 #define _FUI_VARIANT_H_
26
27 #include <FBaseDataType.h>
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Base
31 {
32         class DateTime;
33 } }
34
35 namespace Tizen { namespace Graphics
36 {
37         class Rectangle;
38         class Dimension;
39         class Point;
40         class Color;
41         class FloatPoint;
42         class FloatRectangle;
43         class FloatDimension;
44         class FloatMatrix4;
45 } }
46
47 namespace Tizen { namespace Ui
48 {
49
50 class _VariantImpl;
51
52 /**
53  * @enum                VariantType
54  *
55  * Defines the types which %Variant can hold.
56  *
57  * @since 2.0
58  */
59 enum VariantType
60 {
61         VARIANT_TYPE_NONE = 0, /**< The type for invalid variant */
62         VARIANT_TYPE_INT, /**< The @c int type */
63         VARIANT_TYPE_UINT, /**< The unsigned @c int type */
64         VARIANT_TYPE_BOOL, /**< The @c bool type */
65         VARIANT_TYPE_FLOAT, /**< The @c float type */
66         VARIANT_TYPE_DOUBLE, /**< The @c double type */
67         VARIANT_TYPE_LONG, /**< The @c long type */
68         VARIANT_TYPE_ULONG, /**< The unsigned @c long type */
69         VARIANT_TYPE_LONGLONG, /**< The @c long @c long type */
70         VARIANT_TYPE_ULONGLONG, /**< The unsigned @c long @c long type */
71         VARIANT_TYPE_STRING, /**< The String type */
72         VARIANT_TYPE_DATETIME, /**< The DateTime type */
73         VARIANT_TYPE_COLOR, /**< The Color type */
74         VARIANT_TYPE_POINT, /**< The Point type */
75         VARIANT_TYPE_FLOAT_POINT, /**< The FloatPoint type */
76         VARIANT_TYPE_RECTANGLE, /**< The Rectangle type */
77         VARIANT_TYPE_FLOAT_RECTANGLE, /**< The FloatRectangle type */
78         VARIANT_TYPE_DIMENSION, /**< The Dimension type */
79         VARIANT_TYPE_FLOAT_DIMENSION, /**< The FloatDimension type */
80         VARIANT_TYPE_FLOAT_MATRIX4 /**< The FloatMatrix4 type */
81 };
82
83 /**
84  * @class       Variant
85  * @brief       This class abstracts a %Variant value.
86  *
87  * @since 2.0
88  *
89  *      The %Variant class represents a %Variant type which can hold any of the basic type values.
90  *
91  */
92 class _OSP_EXPORT_ Variant
93         : public Tizen::Base::Object
94 {
95 public:
96         /**
97         * This is the default constructor for this class.
98         *
99         * @since 2.0
100         */
101         Variant(void);
102
103         /**
104         * This is the copy constructor for the %Variant class.
105         *
106         * @since 2.0
107         *
108         * @param[in]    value   A reference to the %Variant instance to copy
109         */
110         Variant(const Variant& value);
111
112         /**
113         * Initializes this instance of %Variant with the specified @c int value.
114         *
115         * @since 2.0
116         *
117         * @param[in]    value   An @c int value
118         */
119         Variant(int value);
120
121         /**
122         * Initializes this instance of %Variant with the specified unsigned @c int value.
123         *
124         * @since 2.0
125         *
126         * @param[in]    value   An unsigned @c int value
127         */
128         Variant(unsigned int value);
129
130         /**
131         * Initializes this instance of %Variant with the specified bool value.
132         *
133         * @since 2.0
134         *
135         * @param[in]    value   A bool value
136         */
137         Variant(bool value);
138
139         /**
140         * Initializes this instance of %Variant with the specified @c float value.
141         *
142         * @since 2.0
143         *
144         * @param[in]    value   A @c float value
145         */
146         Variant(float value);
147
148         /**
149         * Initializes this instance of %Variant with the specified @c double value.
150         *
151         * @since 2.0
152         *
153         * @param[in]    value   A @c double value
154         */
155         Variant(double value);
156
157         /**
158         * Initializes this instance of %Variant with the specified @c long value.
159         *
160         * @since 2.0
161         *
162         * @param[in]    value   A @c long value
163         */
164         Variant(long value);
165
166         /**
167         * Initializes this instance of %Variant with the specified unsigned @c long value.
168         *
169         * @since 2.0
170         *
171         * @param[in]    value   An unsigned @c long value
172         */
173         Variant(unsigned long value);
174
175         /**
176         * Initializes this instance of %Variant with the specified @c long @c long value.
177         *
178         * @since 2.0
179         *
180         * @param[in]    value   A @c long @c long value
181         */
182         Variant(long long value);
183
184         /**
185         * Initializes this instance of %Variant with the specified unsigned @c long @c long value.
186         *
187         * @since 2.0
188         *
189         * @param[in]    value   An unsigned @c long @c long value
190         */
191         Variant(unsigned long long value);
192
193         /**
194         * Initializes this instance of %Variant with the specified array of characters.
195         *
196         * @since 2.0
197         *
198         * @param[in]    pValue  An array of characters value
199         */
200         Variant(const char* pValue);
201
202         /**
203         * Initializes this instance of %Variant with the specified array of Unicode characters.
204         *
205         * @since 2.0
206         *
207         * @param[in]    pValue  An array of Unicode characters value
208         */
209         Variant(const wchar_t* pValue);
210
211         /**
212         * Initializes this instance of %Variant with the specified unsigned string value.
213         *
214         * @since 2.0
215         *
216         * @param[in]    value   An unsigned string value
217         */
218         Variant(const Tizen::Base::String& value);
219
220         /**
221         * Initializes this instance of %Variant with the specified unsigned datetime value.
222         *
223         * @since 2.0
224         *
225         * @param[in]    value   An unsigned datetime value
226         */
227         Variant(const Tizen::Base::DateTime& value);
228
229         /**
230         * Initializes this instance of %Variant with the specified unsigned color value.
231         *
232         * @since 2.0
233         *
234         * @param[in]    value   An unsigned color value
235         */
236         Variant(const Tizen::Graphics::Color& value);
237
238         /**
239         * Initializes this instance of %Variant with the specified unsigned point value.
240         *
241         * @since 2.0
242         *
243         * @param[in]    value   An unsigned point value
244         */
245         Variant(const Tizen::Graphics::Point& value);
246
247         /**
248         * Initializes this instance of %Variant with the specified floatpoint value.
249         *
250         * @since 2.0
251         *
252         * @param[in]    value   A floatpoint value
253         */
254         Variant(const Tizen::Graphics::FloatPoint& value);
255
256         /**
257         * Initializes this instance of %Variant with the specified rectangle value.
258         *
259         * @since 2.0
260         *
261         * @param[in]    value   A rectangle value
262         */
263         Variant(const Tizen::Graphics::Rectangle& value);
264
265         /**
266         * Initializes this instance of %Variant with the specified float-rectangle value.
267         *
268         * @since 2.0
269         *
270         * @param[in]    value   A float-rectangle value
271         */
272         Variant(const Tizen::Graphics::FloatRectangle& value);
273
274         /**
275         * Initializes this instance of %Variant with the specified dimension value.
276         *
277         * @since 2.0
278         *
279         * @param[in]    value   A dimension value
280         */
281         Variant(const Tizen::Graphics::Dimension& value);
282
283         /**
284         * Initializes this instance of %Variant with the specified float-dimension value.
285         *
286         * @since 2.0
287         *
288         * @param[in]    value   A float-dimension value
289         */
290         Variant(const Tizen::Graphics::FloatDimension& value);
291
292         /**
293         * Initializes this instance of %Variant with the specified float-matrix4 value.
294         *
295         * @since 2.0
296         *
297         * @param[in]    value   A float-matrix4 value
298         */
299         Variant(const Tizen::Graphics::FloatMatrix4& value);
300
301         /**
302         * This is the destructor for this class.
303         *
304         * @since 2.0
305         */
306         virtual ~Variant(void);
307
308         /**
309         * Assigns the value of the specified instance to the current instance of %Variant.
310         *
311         * @since 2.0
312         *
313         * @return               A reference to the %Variant instance
314         * @param[in]    rhs             An instance of %Variant to copy
315         */
316         Variant& operator =(const Variant& rhs);
317
318         /**
319         * Assigns the value of the specified instance to the current instance of %Variant.
320         *
321         * @since 2.0
322         *
323         * @return               A reference to the %Variant instance
324         * @param[in]    rhs             An @c int value
325         */
326         Variant& operator =(int rhs);
327
328         /**
329         * Assigns the value of the specified instance to the current instance of %Variant.
330         *
331         * @since 2.0
332         *
333         * @return               A reference to the %Variant instance
334         * @param[in]    rhs             An unsigned @c int value
335         *
336         */
337         Variant& operator =(unsigned int rhs);
338
339         /**
340         * Assigns the value of the specified instance to the current instance of %Variant.
341         *
342         * @since 2.0
343         * @return               A reference to the %Variant instance
344         * @param[in]    rhs             A @c bool value
345         *
346         */
347         Variant& operator =(bool rhs);
348
349         /**
350         * Assigns the value of the specified instance to the current instance of %Variant.
351         *
352         * @since 2.0
353         *
354         * @return               A reference to the %Variant instance
355         * @param[in]    rhs             A @c float value
356         *
357         */
358         Variant& operator =(float rhs);
359
360         /**
361         * Assigns the value of the specified instance to the current instance of %Variant.
362         *
363         * @since 2.0
364         *
365         * @return               A reference to the %Variant instance
366         * @param[in]    rhs             A @c double value
367         *
368         */
369         Variant& operator =(double rhs);
370
371         /**
372         * Assigns the value of the specified instance to the current instance of %Variant.
373         *
374         * @since 2.0
375         *
376         * @return               A reference to the %Variant instance
377         * @param[in]    rhs             A @c long value
378         *
379         */
380         Variant& operator =(long rhs);
381
382         /**
383         * Assigns the value of the specified instance to the current instance of %Variant.
384         *
385         * @since 2.0
386         *
387         * @return               A reference to the %Variant instance
388         * @param[in]    rhs             An unsigned @c long value
389         *
390         */
391         Variant& operator =(unsigned long rhs);
392
393         /**
394         * Assigns the value of the specified instance to the current instance of %Variant.
395         *
396         * @since 2.0
397         *
398         * @return               A reference to the %Variant instance
399         * @param[in]    rhs             A @c long @c long value
400         *
401         */
402         Variant& operator =(long long rhs);
403
404         /**
405         * Assigns the value of the specified instance to the current instance of %Variant.
406         *
407         * @since 2.0
408         * @return               A reference to the %Variant instance
409         * @param[in]    rhs             An unsigned @c long @c long value
410         *
411         */
412         Variant& operator =(unsigned long long rhs);
413
414         /**
415         * Assigns the value of the pointer to the current instance of %Variant.
416         *
417         * @since 2.0
418         *
419         * @return               A reference to the %Variant instance
420         * @param[in]    pRhs    A pointer to an array of characters
421         *
422         */
423         Variant& operator =(const char* pRhs);
424
425         /**
426         * Assigns the value of the pointer to the current instance of %Variant.
427         *
428         * @since 2.0
429         *
430         * @return               A reference to the %Variant instance
431         * @param[in]    pRhs    A pointer to an array of Unicode characters
432         *
433         */
434         Variant& operator =(const wchar_t* pRhs);
435
436         /**
437         * Assigns the value of the specified instance of Tizen::Base::String to the current instance of %Variant.
438         *
439         * @since 2.0
440         *
441         * @return               A reference to the %Variant instance
442         * @param[in]    rhs             An instance of Tizen::Base::String
443         */
444         Variant& operator =(const Tizen::Base::String& rhs);
445
446         /**
447         * Assigns the value of the specified instance of Tizen::Base::DateTime to the current instance of %Variant.
448         *
449         * @since 2.0
450         *
451         * @return               A reference to the %Variant instance
452         * @param[in]    rhs             An instance of Tizen::Base::DateTime
453         */
454         Variant& operator =(const Tizen::Base::DateTime& rhs);
455
456         /**
457         * Assigns the value of the specified instance of Tizen::Graphics::Color to the current instance of %Variant.
458         *
459         * @since 2.0
460         * @return               A reference to the %Variant instance
461         * @param[in]    rhs             An instance of Tizen::Graphics::Color
462         */
463         Variant& operator =(const Tizen::Graphics::Color& rhs);
464
465         /**
466         * Assigns the value of the specified instance of Tizen::Graphics::Point to the current instance of %Variant.
467         *
468         * @since 2.0
469         * @return               A reference to the %Variant instance
470         * @param[in]    rhs             An instance of Tizen::Graphics::Point
471         */
472         Variant& operator =(const Tizen::Graphics::Point& rhs);
473
474         /**
475         * Assigns the value of the specified instance of Tizen::Graphics::FloatPoint to the current instance of %Variant.
476         *
477         * @since 2.0
478         * @return               A reference to the %Variant instance
479         * @param[in]    rhs             An instance of Tizen::Graphics::FloatPoint
480         */
481         Variant& operator =(const Tizen::Graphics::FloatPoint& rhs);
482
483         /**
484         * Assigns the value of the specified instance of Tizen::Graphics::Rectangle to the current instance of %Variant.
485         *
486         * @since 2.0
487         * @return               A reference to the %Variant instance
488         * @param[in]    rhs             An instance of Tizen::Graphics::Rectangle
489         */
490         Variant& operator =(const Tizen::Graphics::Rectangle& rhs);
491
492         /**
493         * Assigns the value of the specified instance of Tizen::Graphics::FloatRectangle to the current instance of %Variant.
494         *
495         * @since 2.0
496         * @return               A reference to the %Variant instance
497         * @param[in]    rhs             An instance of Tizen::Graphics::FloatRectangle
498         */
499         Variant& operator =(const Tizen::Graphics::FloatRectangle& rhs);
500
501         /**
502         * Assigns the value of the specified instance of Tizen::Graphics::Dimension to the current instance of %Variant.
503         *
504         * @since 2.0
505         * @return               A reference to the %Variant instance
506         * @param[in]    rhs             An instance of Tizen::Graphics::Dimension
507         */
508         Variant& operator =(const Tizen::Graphics::Dimension& rhs);
509
510         /**
511         * Assigns the value of the specified instance of Tizen::Graphics::FloatDimension to the current instance of %Variant.
512         *
513         * @since 2.0
514         * @return               A reference to the %Variant instance
515         * @param[in]    rhs             An instance of Tizen::Graphics::FloatDimension
516         */
517         Variant& operator =(const Tizen::Graphics::FloatDimension& rhs);
518
519         /**
520         * Assigns the value of the specified instance of Tizen::Graphics::FloatMatrix4 to the current instance of %Variant.
521         *
522         * @since 2.0
523         * @return               A reference to the %Variant instance
524         * @param[in]    rhs             An instance of Tizen::Graphics::FloatMatrix4
525         */
526         Variant& operator =(const Tizen::Graphics::FloatMatrix4& rhs);
527
528         /**
529         * Checks whether the specified instance and current instance of %Variant have equal values.
530         *
531         * @since 2.0
532         * @return               @c true if the two instances of %Variant are equal, @n
533         *                               else @c false
534         * @param[in]    lhs             An instance of %Variant
535         * @param[in]    rhs             An instance of %Variant
536         */
537         _OSP_EXPORT_    friend bool operator ==(const Variant& lhs, const Variant& rhs);
538
539         /**
540         * Checks whether the specified instance and current instance of %Variant have different values.
541         * @since 2.0
542         *
543         * @return               @c true if the values of the two instances of %Variant are not equal, @n
544         *                               else @c false
545         * @param[in]    lhs             An instance of %Variant
546         * @param[in]    rhs             An instance of %Variant
547         *
548         */
549         _OSP_EXPORT_    friend bool operator !=(const Variant& lhs, const Variant& rhs);
550
551         /**
552         * Gets the signed @c int equivalent of the current instance.
553         *
554         * @since 2.0
555         *
556         * @return               Signed @c int equivalent of the current instance
557         * @exception    E_SUCCESS                       The method is successful.
558         * @exception    E_INVALID_OPERATION     The current variant type is not @c VARIANT_TYPE_INT.
559         * @remarks              The specific error code can be accessed using the GetLastResult() method.
560         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_INT.
561         *
562         */
563         int ToInt(void) const;
564
565         /**
566         * Gets the unsigned @c int equivalent of the current instance.
567         *
568         * @since 2.0
569         *
570         * @return               Unsigned @c int equivalent of the current instance
571         * @exception    E_SUCCESS                               The method is successful.
572         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_UINT.
573         * @remarks              The specific error code can be accessed using the GetLastResult() method.
574         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_UINT.
575         *
576         */
577         unsigned int ToUInt(void) const;
578
579         /**
580         * Gets the @c bool equivalent of the current instance.
581         *
582         * @since 2.0
583         *
584         * @return               @c bool equivalent of the current instance
585         * @exception    E_SUCCESS                               The method is successful.
586         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_BOOL.
587         * @remarks              The specific error code can be accessed using the GetLastResult() method.
588         *                               The method returns @c false and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_BOOL.
589         *
590         */
591         bool ToBool(void) const;
592
593         /**
594         * Gets the @c float equivalent of the current instance.
595         *
596         * @since 2.0
597         *
598         * @return               @c float equivalent of the current instance
599         * @exception    E_SUCCESS                               The method is successful.
600         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_FLOAT.
601         * @remarks              The specific error code can be accessed using the GetLastResult() method.
602         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOAT.
603         *
604         */
605         float ToFloat(void) const;
606
607         /**
608         * Gets the @c double equivalent of the current instance.
609         *
610         * @since 2.0
611         *
612         * @return               @c double equivalent of the current instance
613         * @exception    E_SUCCESS                               The method is successful.
614         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_DOUBLE.
615         * @remarks              The specific error code can be accessed using the GetLastResult() method.
616         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DOUBLE.
617         *
618         */
619         double ToDouble(void) const;
620
621         /**
622         * Gets the signed @c long equivalent of the current instance.
623         *
624         * @since 2.0
625         *
626         * @return               Signed @c long equivalent of the current instance
627         * @exception    E_SUCCESS                               The method is successful.
628         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_LONG.
629         * @remarks              The specific error code can be accessed using the GetLastResult() method.
630         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONG.
631         *
632         */
633         long ToLong(void) const;
634
635         /**
636         * Gets the unsigned @c int equivalent of the current instance.
637         *
638         * @since 2.0
639         *
640         * @return               Unsigned @c long equivalent of the current instance
641         * @exception    E_SUCCESS                               The method is successful.
642         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_ULONG.
643         * @remarks              The specific error code can be accessed using the GetLastResult() method.
644         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONG.
645         *
646         */
647         unsigned long ToULong(void) const;
648
649         /**
650         * Gets the signed @c long @c long equivalent of the current instance.
651         *
652         * @since 2.0
653         *
654         * @exception    E_SUCCESS                               The method is successful.
655         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_LONGLONG.
656         *
657         * @remarks              The specific error code can be accessed using the GetLastResult() method.
658         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_LONGLONG.
659         *
660         */
661         long long ToLongLong(void) const;
662
663         /**
664         * Gets the unsigned @c long @c long equivalent of the current instance.
665         *
666         * @since 2.0
667         *
668         * @return               Unsigned @c long @c long equivalent of the current instance
669         * @exception    E_SUCCESS                               The method is successful.
670         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_ULONGLONG.
671         * @remarks              The specific error code can be accessed using the GetLastResult() method.
672         *                               The method returns @c 0 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_ULONGLONG.
673         *
674         */
675         unsigned long long ToULongLong(void) const;
676
677         /**
678         * Gets the Tizen::Base::String representation of the value of the current instance.
679         *
680         * @since 2.0
681         *
682         * @return               A Tizen::Base::String representing the value of the current instance
683         * @exception    E_SUCCESS                               The method is successful.
684         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_STRING.
685         * @remarks              The specific error code can be accessed using the GetLastResult() method.
686         *                               The method returns String("") and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_STRING.
687         *
688         */
689         Tizen::Base::String ToString(void) const;
690
691         /**
692         * Gets the Tizen::Base::DateTime representation of the value of the current instance.
693         *
694         * @since 2.0
695         *
696         * @return               A Tizen::Base::DateTime representing the value of the current instance
697         * @exception    E_SUCCESS                               The method is successful.
698         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_DATETIME.
699         * @remarks              The specific error code can be accessed using the GetLastResult() method.
700         *                               The method returns DateTime and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DATETIME.
701         *
702         */
703         Tizen::Base::DateTime ToDateTime(void) const;
704
705         /**
706         * Gets the Tizen::Graphics::Color representation of the value of the current instance.
707         *
708         * @since 2.0
709         *
710         * @return               A Tizen::Graphics::Color representing the value of the current instance
711         * @exception    E_SUCCESS                               The method is successful.
712         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_COLOR.
713         * @remarks              The specific error code can be accessed using the GetLastResult() method.
714         *                               The method returns Color and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_COLOR.
715         *
716         */
717         Tizen::Graphics::Color ToColor(void) const;
718
719         /**
720         * Gets the Tizen::Graphics::Point representation of the value of the current instance.
721         *
722         * @since 2.0
723         *
724         * @return               A Tizen::Graphics::Point representing the value of the current instance
725         * @exception    E_SUCCESS                               The method is successful.
726         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_POINT.
727         * @remarks              The specific error code can be accessed using the GetLastResult() method.
728         *                               The method returns Point and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_POINT.
729         *
730         */
731         Tizen::Graphics::Point ToPoint(void) const;
732
733         /**
734         * Gets the Tizen::Graphics::FloatPoint representation of the value of the current instance.
735         *
736         * @since 2.0
737         *
738         * @return               A Tizen::Graphics::FloatPoint representing the value of the current instance
739         * @exception    E_SUCCESS                               The method is successful.
740         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_FLOATPOINT.
741         * @remarks              The specific error code can be accessed using the GetLastResult() method.
742         *                               The method returns FloatPoint and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOATPOINT.
743         *
744         */
745         Tizen::Graphics::FloatPoint ToFloatPoint(void) const;
746
747         /**
748         * Gets the Tizen::Graphics::Rectangle representation of the value of the current instance.
749         *
750         * @since 2.0
751         *
752         * @return               A Tizen::Graphics::Rectangle representing the value of the current instance
753         * @exception    E_SUCCESS                               The method is successful.
754         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_RECTANGLE.
755         * @remarks              The specific error code can be accessed using the GetLastResult() method.
756         *                               The method returns Rectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_RECTANGLE.
757         *
758         */
759         Tizen::Graphics::Rectangle ToRectangle(void) const;
760
761         /**
762         * Gets the Tizen::Graphics::FloatRectangle representation of the value of the current instance.
763         *
764         * @since 2.0
765         *
766         * @return               A Tizen::Graphics::FloatRectangle representing the value of the current instance
767         * @exception    E_SUCCESS                               The method is successful.
768         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_FLOATRECTANGLE.
769         * @remarks              The specific error code can be accessed using the GetLastResult() method.
770         *                               The method returns FloatRectangle and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOATRECTANGLE.
771         *
772         */
773         Tizen::Graphics::FloatRectangle ToFloatRectangle(void) const;
774
775         /**
776         * Gets the Tizen::Graphics::Dimension representation of the value of the current instance.
777         *
778         * @since 2.0
779         *
780         * @return               A Tizen::Graphics::Dimension representing the value of the current instance
781         * @exception    E_SUCCESS                               The method is successful.
782         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_DIMENSION.
783         * @remarks              The specific error code can be accessed using the GetLastResult() method.
784         *                               The method returns Dimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_DIMENSION.
785         *
786         */
787         Tizen::Graphics::Dimension ToDimension(void) const;
788
789         /**
790         * Gets the Tizen::Graphics::FloatDimension representation of the value of the current instance.
791         *
792         * @since 2.0
793         *
794         * @return               A Tizen::Graphics::FloatDimension representing the value of the current instance
795         * @exception    E_SUCCESS                               The method is successful.
796         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_FLOATDIMENSION.
797         * @remarks              The specific error code can be accessed using the GetLastResult() method.
798         *                               The method returns FloatDimension and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOATDIMENSION.
799         *
800         */
801         Tizen::Graphics::FloatDimension ToFloatDimension(void) const;
802
803         /**
804         * Gets the Tizen::Graphics::FloatMatrix4 representation of the value of the current instance.
805         *
806         * @since 2.0
807         *
808         * @return               A Tizen::Graphics::FloatMatrix4 representing the value of the current instance
809         * @exception    E_SUCCESS                               The method is successful.
810         * @exception    E_INVALID_OPERATION             The current variant type is not @c VARIANT_TYPE_FLOATMATRIX4.
811         * @remarks              The specific error code can be accessed using the GetLastResult() method.
812         *                               The method returns FloatMatrix4 and generates @c E_INVALID_OPERATION exception if the current variant type is not @c VARIANT_TYPE_FLOATMATRIX4.
813         *
814         */
815         Tizen::Graphics::FloatMatrix4 ToFloatMatrix4(void) const;
816
817         /**
818         * Checks whether the variant is empty.
819         *
820         * @since 2.0
821         *
822         * @return               @c true if the current instance is @c NULL_VARIANT, @n
823         *                               else @c false
824         */
825         bool IsEmpty(void) const;
826
827         /**
828         * Gets the type of the variant.
829         *
830         * @since 2.0
831         *
832         * @return               The variant type
833         */
834         VariantType GetType(void) const;
835
836         /**
837         * Checks whether the current instance of %Variant equals the specified instance of %Variant.
838         *
839         * @since 2.0
840         *
841         * @return               @c true if the values of the current instance is equal to the value of the specified instance, @n
842         *                               else @c false
843         * @param[in]    obj             An instance of %Variant
844         * @remarks              This method overrides Tizen::Base::Object::Equals(). This method uses the values of the %Variant to compare the two instances.
845         */
846         virtual bool Equals(const Object& obj) const;
847
848         /**
849         * Gets the hash value of the current instance.
850         *
851         * @since 2.0
852         *
853         * @return               The hash value of the current instance
854         * @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.
855         */
856         virtual int GetHashCode(void) const;
857
858 public:
859         /**
860          * A constant represents a @c null value.
861          *
862          * @since 2.0
863          */
864         static const Variant NULL_VARIANT;
865
866         //
867         // This method is for internal use only.
868         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
869         //
870         // This method is prohibited. If this method is used in an application, the application can get rejected during
871         // the certification process.
872         //
873         // @since 2.0
874         //
875         const _VariantImpl* GetVariantImpl(void) const;
876
877         //
878         // This method is for internal use only.
879         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
880         //
881         // This method is prohibited. If this method is used in an application, the application can get rejected during
882         // the certification process.
883         //
884         // @since 2.0
885         //
886         _VariantImpl* GetVariantImpl(void);
887
888 private:
889         _VariantImpl* __pVariantImpl;
890 }; // Variant
891
892 } } // Tizen::Ui
893
894 #endif // _FUI_VARIANT_H_