-/**
- * @brief Creates a map with pairs 'key,value' with the font's style parameters.
- *
- * @param[in] node Data structure with the font's style parameters.
- * @param[out] map A map with the font's style parameters.
- *
- */
-void CreateFontStyleMap( const TreeNode* const node, Property::Map& map )
-{
- switch( node->GetType() )
- {
- case TreeNode::IS_NULL:
- case TreeNode::OBJECT:
- case TreeNode::ARRAY: // FALL THROUGH
- {
- break;
- }
- case TreeNode::STRING:
- {
- map.Insert( node->GetName(), Property::Value( node->GetString() ) );
- break;
- }
- case TreeNode::INTEGER:
- case TreeNode::FLOAT:
- case TreeNode::BOOLEAN: // FALL THROUGH
- {
- break;
- }
- }
-
- for( TreeNode::ConstIterator it = node->CBegin(), endIt = node->CEnd(); it != endIt; ++it )
- {
- const TreeNode::KeyNodePair& pair = *it;
- CreateFontStyleMap( &pair.second, map );
- }
-}
-
-/**
- * @brief Parses the font's style string.
- *
- * @param[in] style The font's style string.
- * @param[out] map A map with the font's style parameters.
- *
- */
-void ParseFontStyleString( const std::string& style, Property::Map& map )
-{
- Toolkit::JsonParser parser = Toolkit::JsonParser::New();
-
- if( parser.Parse( style ) )
- {
- const TreeNode* const node = parser.GetRoot();
-
- if( NULL != node )
- {
- CreateFontStyleMap( node, map );
- }
- }
-}
-