2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUi_ResourceConfigParser.h
19 * @brief This is the header file for ConfigParser class.
22 * This header file contains declaration of ConfigParser class.
25 #ifndef _FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_
26 #define _FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_
28 #include <libxml/tree.h>
30 namespace Tizen { namespace Base
35 namespace Tizen { namespace Base { namespace Collection
37 template<class KeyType, class ValueType> class HashMapT;
40 namespace Tizen { namespace Graphics
45 namespace Tizen { namespace Ui { namespace _Resource
54 bool Parse(const Tizen::Base::String& filename, MapContainer & table);
55 static void StartSaxFunc(void* pXmlParserCtxt, const xmlChar* pName, const xmlChar** pAttributes);
56 static Tizen::Base::Collection::HashMapT<Tizen::Base::String, Tizen::Base::String*>* GetMatchingTable(void);
58 class ColorMatchingMap
59 : public Tizen::Base::Collection::HashMapT<Tizen::Base::String, Tizen::Base::String*>
62 ColorMatchingMap(void);
63 virtual ~ColorMatchingMap(void);
64 bool Initialize(const Tizen::Base::String& version, const Tizen::Base::String& dVersion = L"");
66 Tizen::Base::Collection::IHashCodeProviderT<Tizen::Base::String>* __pProvider;
67 Tizen::Base::Collection::IComparerT<Tizen::Base::String>* __pComparer;
71 void SetInformation(const xmlChar** pAttributes);
72 void StartAttribute(const xmlChar** pAttributes);
73 void AddColor(const xmlChar** pAttributes);
74 void AddImage(const xmlChar** pAttributes);
75 void SetColorMatchingMap(const Tizen::Base::String& version);
76 void ConvertStringToColor32(const char* pString, Tizen::Graphics::Color& color);
77 void GetValue(const Tizen::Base::String& value, Tizen::Base::String& out);
78 void GetValue(const Tizen::Base::String& value, Tizen::Graphics::Color& out);
80 MapContainer* __pMapContainer;
81 Tizen::Base::String __currentAttribute;
82 }; //class ConfigParser
86 #endif //_FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_