1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 // http://floralicense.org/license/
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.
21 #include <dali/public-api/object/property-value.h>
22 #include <dali/internal/update/common/scene-graph-property-notification.h>
31 class PropertyNotification;
37 * Step condition class,
38 * Checks if a Property has stepped a certain amount from the reference point
40 * float => value has stepped arg1 amount from arg0.
41 * Vector2 => 2 dimensional length of vector has stepped arg1 amount from arg0.
42 * Vector3 => 3 dimensional length of vector has stepped arg1 amount from arg0.
43 * Vector4 => 4 dimensional length of vector has stepped arg1 amount from arg0.
44 * Default => return false.
52 * @return function pointer to the correct condition function, based on
53 * the type of value being examined.
55 static ConditionFunction GetFunction( Property::Type valueType );
59 static bool Evaluate( const float propertyValue, PropertyNotification::RawArgumentContainer& arg );
62 * Checks if float is Outside
63 * @param[in] value The value being examined.
64 * @param[in] arg The supplied arguments for the condition.
65 * @return Condition result (true if condition met, false if not)
67 static bool EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
70 * Checks if Vector2.Length() is Outside
71 * @param[in] value The value being examined.
72 * @param[in] arg The supplied arguments for the condition.
73 * @return Condition result (true if condition met, false if not)
75 static bool EvalVector2( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
78 * Checks if Vector3.Length() is Outside
79 * @param[in] value The value being examined.
80 * @param[in] arg The supplied arguments for the condition.
81 * @return Condition result (true if condition met, false if not)
83 static bool EvalVector3( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
86 * Checks if Vector4.Length() is Outside
87 * @param[in] value The value being examined.
88 * @param[in] arg The supplied arguments for the condition.
89 * @return Condition result (true if condition met, false if not)
91 static bool EvalVector4( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
94 * Default check for other types.
95 * @param[in] value The value being examined.
96 * @param[in] arg The supplied arguments for the condition.
97 * @return Condition result (true if condition met, false if not)
99 static bool EvalDefault( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
103 } // namespace SceneGraph
105 } // namespace Internal
109 #endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__