Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / internal / event / common / property-conditions-impl.h
1 #ifndef __DALI_INTERNAL_PROPERTY_CONDITIONS_H__
2 #define __DALI_INTERNAL_PROPERTY_CONDITIONS_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/object/base-object.h>
23 #include <dali/public-api/object/property-conditions.h>
24 #include <dali/public-api/object/property-value.h>
25 #include <dali/public-api/object/property-value.h>
26
27 namespace Dali
28 {
29
30 namespace Internal
31 {
32
33 /**
34  * Structure to contain PropertyCondition internal data
35  */
36
37 class PropertyCondition : public Dali::BaseObject
38 {
39
40 public:
41
42   /**
43    * Condition types.
44    */
45   enum Type
46   {
47     False,                ///< Result Always False
48     LessThan,             ///< Magnitude of type is less than float value (arg0).
49     GreaterThan,          ///< Magnitude of type is greater than float value (arg0).
50     Inside,               ///< Magnitude of type is within float values (arg0 & arg1).
51     Outside,              ///< Magnitude of type is outside float values (arg0 & arg1).
52     Step,                 ///< Value of type has crossed a step amount
53     VariableStep          ///< Similar to step, except user can define a list of steps from reference value
54   };
55
56   typedef Dali::PropertyCondition::ArgumentContainer ArgumentContainer;
57   typedef Dali::PropertyCondition::ArgumentIter ArgumentIter;
58   typedef Dali::PropertyCondition::ArgumentConstIter ArgumentConstIter;
59
60   PropertyCondition();
61
62   virtual ~PropertyCondition();
63
64 private:
65
66 private:
67
68   // Not implemented
69   PropertyCondition(const PropertyCondition& rhs);
70
71   // Not implemented
72   PropertyCondition& operator=(const PropertyCondition& rhs);
73
74 public:
75
76   Type type;                        ///< The condition Type.
77   ArgumentContainer arguments;      ///< The condition Arguments.
78
79 };
80
81 } // namespace Internal
82
83 // Helpers for public-api forwarding methods
84
85 inline Internal::PropertyCondition& GetImplementation(Dali::PropertyCondition& pub)
86 {
87   DALI_ASSERT_ALWAYS( pub && "PropertyCondition handle is empty" );
88
89   BaseObject& handle = pub.GetBaseObject();
90
91   return static_cast<Internal::PropertyCondition&>(handle);
92 }
93
94 inline const Internal::PropertyCondition& GetImplementation(const Dali::PropertyCondition& pub)
95 {
96   DALI_ASSERT_ALWAYS( pub && "PropertyCondition handle is empty" );
97
98   const BaseObject& handle = pub.GetBaseObject();
99
100   return static_cast<const Internal::PropertyCondition&>(handle);
101 }
102
103 } // namespace Dali
104
105 #endif // __DALI_INTERNAL_PROPERTY_CONDITIONS_H__