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 #include "FUi_ResourceConfigLoader.h"
20 using namespace Tizen::Base::Collection;
22 namespace Tizen { namespace Ui { namespace _Resource {
24 ConfigLoader* pColorLoader = null;
27 ConfigLoader::GetInstance(void)
29 static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;
31 if (pColorLoader == null)
33 pthread_once(&onceBlock, CreateInstance);
39 ConfigLoader::CreateInstance(void)
41 static ConfigLoader loader;
42 pColorLoader = &loader;
45 ConfigLoader::~ConfigLoader(void)
47 __itemList.RemoveAll();
50 ConfigLoader::AddInitFunc(_Init_Func func)
55 ConfigLoader::GetInitFuncCount(void) const
57 return __itemList.GetCount();
60 ConfigLoader::GetInitFunc(int index, _Init_Func& func) const
62 int count = __itemList.GetCount();
67 return __itemList.GetAt(index, func);
69 ConfigLoader::ConfigLoader(void)
73 }}}//Tizen::Ui::_Resource