Fix code to not include std set directly
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-vector3.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // INTERNAL INCLUDES
21 #include <dali/public-api/common/dali-common.h>
22 #include <dali/public-api/math/vector3.h>
23 #include <dali/public-api/object/property.h>
24 #include <dali/public-api/object/property-input.h>
25 #include <dali/public-api/object/property-types.h>
26 #include <dali/internal/common/buffer-index.h>
27 #include <dali/internal/event/common/property-input-impl.h>
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34
35 namespace SceneGraph
36 {
37
38 /**
39  * A Vector3 non-animatable property.
40  */
41 template <int DirtyFlagMask>
42 class PropertyVector3 : public PropertyInputImpl
43 {
44 public:
45
46   /**
47    * Create an non-animatable property.
48    * @param [in] initialValue The initial value of the property.
49    * @param [in] dirtyFlags One bit of this mask will be set when the property changes.
50    */
51   PropertyVector3( Vector3 initialValue, int& dirtyFlags )
52   : mValue( initialValue ), mDirtyFlags( dirtyFlags )
53   {
54   }
55
56   /**
57    * Virtual destructor.
58    */
59   virtual ~PropertyVector3()
60   {
61   }
62
63   /**
64    * @copydoc Dali::Internal::PropertyInputImpl::GetType()
65    */
66   virtual Dali::Property::Type GetType() const
67   {
68     return Dali::PropertyTypes::Get<Vector3>();
69   }
70
71   /**
72    * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
73    */
74   virtual bool InputInitialized() const
75   {
76     return true; // Animatable properties are always valid
77   }
78
79   /**
80    * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
81    */
82   virtual bool InputChanged() const
83   {
84     return (mDirtyFlags & DirtyFlagMask);
85   }
86
87   /**
88    * @copydoc Dali::PropertyInput::GetVector3()
89    */
90   virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
91   {
92     return mValue;
93   }
94
95   /**
96    * Flag that the property has been Set during the current frame.
97    */
98   void OnSet()
99   {
100     mDirtyFlags |= DirtyFlagMask;
101   }
102
103 private:
104
105   // Undefined
106   PropertyVector3(const PropertyVector3& property);
107
108   // Undefined
109   PropertyVector3& operator=(const PropertyVector3& rhs);
110
111 public:
112
113   Vector3 mValue; ///< The property value
114
115 private:
116
117   int& mDirtyFlags;
118 };
119
120 } // namespace SceneGraph
121
122 } // namespace Internal
123
124 } // namespace Dali
125
126 #endif // __DALI_INTERNAL_SCENE_GRAPH_VECTOR3_PROPERTY_H__