1 #ifndef __DALI_PROPERTY_INPUT_H__
2 #define __DALI_PROPERTY_INPUT_H__
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/property.h>
27 * @addtogroup dali_core_object
39 * @brief An abstract interface for receiving property values.
42 class DALI_CORE_API PropertyInput
46 class Extension; ///< Forward declare future extension interface
49 * @brief Virtual destructor.
52 virtual ~PropertyInput() = 0;
55 * @brief Queries the type of property input.
58 * @return The property type
60 virtual Property::Type GetType() const = 0;
63 * @brief Retrieves a boolean value.
66 * @return The boolean value
67 * @pre GetType() returns Property::BOOLEAN.
69 virtual const bool& GetBoolean() const = 0;
72 * @brief Retrieves a float value.
75 * @return The float value
76 * @pre GetType() returns Property::FLOAT.
78 virtual const float& GetFloat() const = 0;
81 * @brief Retrieves an integer value.
84 * @return The integer value
85 * @pre GetType() returns Property::INTEGER.
87 virtual const int& GetInteger() const = 0;
90 * @brief Retrieves a Vector2 value.
93 * @return The Vector2 value
94 * @pre GetType() returns Property::VECTOR2.
96 virtual const Vector2& GetVector2() const = 0;
99 * @brief Retrieves a Vector3 value.
102 * @return The Vector3 value
103 * @pre GetType() returns Property::VECTOR3.
105 virtual const Vector3& GetVector3() const = 0;
108 * @brief Retrieves a Vector4 value.
111 * @return The Vector4 value
112 * @pre GetType() returns Property::VECTOR4.
114 virtual const Vector4& GetVector4() const = 0;
117 * @brief Retrieves a Matrix (3x3) value.
120 * @return The Matrix value
121 * @pre GetType() returns Property::Matrix3.
123 virtual const Matrix3& GetMatrix3() const = 0;
126 * @brief Retrieves a Matrix (4x4) value.
129 * @return The Matrix value
130 * @pre GetType() returns Property::Matrix4.
132 virtual const Matrix& GetMatrix() const = 0;
135 * @brief Retrieves a Quaternion value.
138 * @return The Quaternion value
139 * @pre GetType() returns Property::Quaternion.
141 virtual const Quaternion& GetQuaternion() const = 0;
144 * @brief Retrieves the extension for the PropertyInput
147 * @return The extension if available, NULL otherwise
149 virtual Extension* GetExtension()
160 #endif // __DALI_PROPERTY_INPUT_H__