-
-/*
- * Set a property value from a tree node.
- * This function guesses the type of the property from the format of the string in the node.
- * This is not always possible and could be surprising.
- * @param node The node string to convert from
- * @param value The property value to set
- * @return true if the string could be converted.
- */
-bool SetPropertyFromNode( const TreeNode& node, Property::Value& value );
-
-/*
- * Set a property value from a tree node as SetPropertyFromNode() above
- * @param node The node string to convert from
- * @param value The property value to set
- * @param replacement The overriding replacement map (if any)
- * @return true if the string could be converted.
- */
-bool SetPropertyFromNode( const TreeNode& node, Property::Value& value,
- const Replacement& replacement );
-
-/*
- * Set a property value as the given type from a tree node.
- * @param node The node string to convert from
- * @param type The property type to convert to.
- * @param value The property value to set
- * @return true if the string could be converted to the correct type.
- */
-bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value );
-
-/*
- * Set a property value as the given type from a tree node as SetPropertyFromNode() above
- * @param node The node string to convert from
- * @param type The property type to convert to.
- * @param value The property value to set
- * @param replacement The overriding replacement map (if any)
- * @return true if the string could be converted to the correct type.
- */
-bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value,
- const Replacement& replacement );
-
-
-namespace
-{
-
-/**
- * Converts a HTML style 'color' hex string ("#FF0000" for bright red) to a Vector4.
- * The Vector4 alpha component will be set to 1.0f
- * @param hexString The HTML style hex string
- * @return a Vector4 containing the new color value
- */
-Vector4 HexStringToVector4( const char* s )
-{
- unsigned int value(0u);
- std::istringstream( s ) >> std::hex >> value;
- return Vector4( ((value >> 16 ) & 0xff ) / 255.0f,
- ((value >> 8 ) & 0xff ) / 255.0f,
- (value & 0xff ) / 255.0f,
- 1.0f );
-}
-
-} // anon namespace
-
-