1 #ifndef DALI_PROPERTY_INPUT_H
2 #define DALI_PROPERTY_INPUT_H
5 * Copyright (c) 2020 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
45 class Extension; ///< Forward declare future extension interface
48 * @brief Virtual destructor.
51 virtual ~PropertyInput() = 0;
54 * @brief Queries the type of property input.
57 * @return The property type
59 virtual Property::Type GetType() const = 0;
62 * @brief Retrieves a boolean value.
65 * @return The boolean value
66 * @pre GetType() returns Property::BOOLEAN.
68 virtual const bool& GetBoolean() const = 0;
71 * @brief Retrieves a float value.
74 * @return The float value
75 * @pre GetType() returns Property::FLOAT.
77 virtual const float& GetFloat() const = 0;
80 * @brief Retrieves an integer value.
83 * @return The integer value
84 * @pre GetType() returns Property::INTEGER.
86 virtual const int& GetInteger() const = 0;
89 * @brief Retrieves a Vector2 value.
92 * @return The Vector2 value
93 * @pre GetType() returns Property::VECTOR2.
95 virtual const Vector2& GetVector2() const = 0;
98 * @brief Retrieves a Vector3 value.
101 * @return The Vector3 value
102 * @pre GetType() returns Property::VECTOR3.
104 virtual const Vector3& GetVector3() const = 0;
107 * @brief Retrieves a Vector4 value.
110 * @return The Vector4 value
111 * @pre GetType() returns Property::VECTOR4.
113 virtual const Vector4& GetVector4() const = 0;
116 * @brief Retrieves a Matrix (3x3) value.
119 * @return The Matrix value
120 * @pre GetType() returns Property::Matrix3.
122 virtual const Matrix3& GetMatrix3() const = 0;
125 * @brief Retrieves a Matrix (4x4) value.
128 * @return The Matrix value
129 * @pre GetType() returns Property::Matrix4.
131 virtual const Matrix& GetMatrix() const = 0;
134 * @brief Retrieves a Quaternion value.
137 * @return The Quaternion value
138 * @pre GetType() returns Property::Quaternion.
140 virtual const Quaternion& GetQuaternion() const = 0;
143 * @brief Retrieves the extension for the PropertyInput
146 * @return The extension if available, NULL otherwise
148 virtual Extension* GetExtension()
159 #endif // DALI_PROPERTY_INPUT_H