Merge "Fix resource leaks in layouting." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / builder-set-property.h
1 #ifndef DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
2 #define DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
3
4 /*
5  * Copyright (c) 2016 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 namespace Dali
21 {
22 namespace Toolkit
23 {
24 namespace Internal
25 {
26
27 /**
28  * Set a property value from a tree node.
29  * This function determines the type of the property from the format of the string in the node.
30  * This is not always possible and if the type cannot be determined then then the type will default to Array.
31  * @param node  The node string to convert from
32  * @param value The property value to set
33  */
34 void DeterminePropertyFromNode( const TreeNode&  node,
35                                 Property::Value& value );
36
37 /**
38  * Set a property value from a tree node as DeterminePropertyFromNode() above
39  * This function determines the type of the property from the format of the string in the node.
40  * This is not always possible and if the type cannot be determined then then the type will default to Array.
41  * @param node  The node string to convert from
42  * @param value The property value to set
43  * @param replacement The overriding replacement map (if any)
44  */
45 void DeterminePropertyFromNode( const TreeNode&    node,
46                                 Property::Value&   value,
47                                 const Replacement& replacement );
48
49 /**
50  * Set a property value as the given type from a tree node.
51  * @param node The node string to convert from
52  * @param type The property type to convert to.
53  * @param value The property value to set
54  * @return true if the string could be converted to the correct type.
55  */
56 bool DeterminePropertyFromNode( const TreeNode&  node,
57                                 Property::Type   type,
58                                 Property::Value& value );
59
60 /**
61  * Set a property value as the given type from a tree node as DeterminePropertyFromNode() above
62  * @param node The node string to convert from
63  * @param type The property type to convert to.
64  * @param value The property value to set
65  * @param replacement The overriding replacement map (if any)
66  * @return true if the string could be converted to the correct type.
67  */
68 bool DeterminePropertyFromNode( const TreeNode&    node,
69                                 Property::Type     type,
70                                 Property::Value&   value,
71                                 const Replacement& replacement );
72
73
74 } // Internal namespace
75 } // Toolkit namespace
76 } // Dali namespace
77
78 #endif //DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H