Reducing boilerplate on default property metadata
[platform/core/uifw/dali-core.git] / dali / internal / event / object / default-property-metadata.h
1 #ifndef DALI_DEFAULT_PROPERTY_METADATA_H
2 #define DALI_DEFAULT_PROPERTY_METADATA_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
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
21 // INTERNAL INCLUDES
22 #include <dali/public-api/object/property.h>
23
24 namespace Dali
25 {
26 /**
27  * @addtogroup dali_core_object
28  * @{
29  */
30
31 /**
32  * @brief Structure for setting up default properties and their details.
33  */
34 struct PropertyDetails
35 {
36   const char* name;           ///< The name of the property.
37   Property::Index enumIndex;  ///< Used to check the index is correct within a debug build.
38   Property::Type type;        ///< The property type.
39   bool writable;              ///< Whether the property is writable
40   bool animatable;            ///< Whether the property is animatable.
41   bool constraintInput;       ///< Whether the property can be used as an input to a constraint.
42 };
43
44 /**
45  * Struct to capture the address of the default property table and count of them.
46  */
47 struct DefaultPropertyMetadata
48 {
49   const PropertyDetails* propertyTable; ///< address of the table defining property meta-data.
50   Property::Index propertyCount;        ///< count of the default properties.
51 };
52
53 } // namespace Dali
54
55 #endif // DALI_DEFAULT_PROPERTY_METADATA_H