Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-base.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BASE_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BASE_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 // EXTERNAL INCLUDES
21 #include <cstddef>
22
23 // INTERNAL INCLUDES
24 #include <dali/public-api/object/property.h>
25 #include <dali/internal/common/type-abstraction.h>
26 #include <dali/internal/event/common/property-input-impl.h>
27 #include <dali/internal/update/common/scene-graph-buffers.h>
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34
35 namespace SceneGraph
36 {
37
38 /**
39  * Polymorphic base class for scene-graph properties, held by Nodes etc.
40  */
41 class PropertyBase : public PropertyInputImpl
42 {
43 public:
44
45   /**
46    * Default constructor.
47    */
48   PropertyBase();
49
50   /**
51    * Virtual destructor.
52    */
53   virtual ~PropertyBase();
54
55   /**
56    * Reset the property to a base value; only required if the property is animated.
57    * @param [in] currentBufferIndex The current buffer index.
58    */
59   virtual void ResetToBaseValue(BufferIndex updateBufferIndex) = 0;
60
61   /**
62    * @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
63    */
64   virtual bool InputChanged() const
65   {
66     return !IsClean();
67   }
68
69   /**
70    * Query whether the property has changed.
71    * @return True if the property has not changed.
72    */
73   virtual bool IsClean() const = 0;
74
75 private:
76
77   // Undefined
78   PropertyBase(const PropertyBase& property);
79
80   // Undefined
81   PropertyBase& operator=(const PropertyBase& rhs);
82 };
83
84 } // namespace SceneGraph
85
86 } // namespace Internal
87
88 } // namespace Dali
89
90 #endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BASE_H__