1 #ifndef DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
2 #define DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
5 * Copyright (c) 2016 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.
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
34 void DeterminePropertyFromNode( const TreeNode& node,
35 Property::Value& value );
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)
45 void DeterminePropertyFromNode( const TreeNode& node,
46 Property::Value& value,
47 const Replacement& replacement );
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.
56 bool DeterminePropertyFromNode( const TreeNode& node,
58 Property::Value& value );
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.
68 bool DeterminePropertyFromNode( const TreeNode& node,
70 Property::Value& value,
71 const Replacement& replacement );
74 } // Internal namespace
75 } // Toolkit namespace
78 #endif //DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H