Init Tizen 2.2.1
[framework/osp/uix.git] / inc / FUixSensorUserAccelerationSensorData.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
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     FUixSensorUserAccelerationSensorData.h
20  * @brief    This is the header file for the %UserAccelerationSensorData class.
21  *
22  * This header file contains the declarations of the %UserAccelerationSensorData class.
23  */
24
25 #ifndef _FUIX_SENSOR_USER_ACCELERATION_SENSOR_DATA_H_
26 #define _FUIX_SENSOR_USER_ACCELERATION_SENSOR_DATA_H_
27
28 #include <FOspConfig.h>
29 #include <FUixSensorSensorData.h>
30
31 namespace Tizen { namespace Uix { namespace Sensor
32 {
33 /**
34  * @class    UserAccelerationSensorData
35  * @brief    This class stores user-acceleration sensor data, including a time stamp.
36  *
37  * @since 2.1
38  *
39  * The %UserAccelerationSensorData class stores user-acceleration sensor data, including a time stamp.
40  * @n
41  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
42  */
43 class _OSP_EXPORT_ UserAccelerationSensorData
44         : public Tizen::Uix::Sensor::SensorData
45 {
46 public:
47         /**
48          * This is the default constructor for this class.
49          *
50          * @since 2.1
51          */
52                 UserAccelerationSensorData(void);
53
54         /**
55          * This is the destructor for this class.
56          *
57          * @since 2.1
58          */
59         virtual ~UserAccelerationSensorData(void);
60
61         /**
62          * Copying of objects using this copy constructor is allowed.
63          *
64          * @since               2.1
65          *
66          * @param[in]   rhs     An instance of %UserAccelerationSensorData to copy
67          */
68         UserAccelerationSensorData(const UserAccelerationSensorData& rhs);
69
70         /**
71          * Compares the equality of values between two %UserAccelerationSensorData objects by overriding the Tizen::Base::Object::Equals() method.
72          *
73          * @since          2.1
74          *
75          * @return         @c true if all the fields in the objects are equal, @n
76          *                 else @c false
77          * @param[in]      rhs     The Tizen::Base::Object with which the comparison is done
78          * @remarks                An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
79          */
80         virtual bool Equals(const Tizen::Base::Object& rhs) const;
81
82         /**
83          * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
84          *
85          * @since         2.1
86          *
87          * @return        The hash value of the current instance
88          */
89         virtual int GetHashCode(void) const;
90
91         /**
92          * Copying of objects using this copy assignment operator is allowed.
93          *
94          * @since          2.1
95          *
96          * @return         A reference to this instance
97          * @param[in]    rhs An instance of %UserAccelerationSensorData to copy
98          */
99         UserAccelerationSensorData& operator =(const UserAccelerationSensorData& rhs);
100
101 private:
102         virtual result GetValue(SensorDataKey dataKey, long& value) const;
103         virtual result GetValue(SensorDataKey dataKey, float& value) const;
104         virtual result GetValue(SensorDataKey dataKey, bool& value) const;
105
106 public:
107         /**
108          * The x-axis value of the user-acceleration sensor data
109          *
110          * @since 2.1
111          */
112         float x;
113
114         /**
115          * The y-axis value of the user-acceleration sensor data
116          *
117          * @since 2.1
118          */
119         float y;
120
121         /**
122          * The z-axis value of the user-acceleration sensor data
123          *
124          * @since 2.1
125          */
126         float z;
127 }; // UserAccelerationSensorData
128 } } } // Tizen::Uix::Sensor
129
130 #endif // _FUIX_SENSOR_USER_ACCELERATION_SENSOR_DATA_H_