2 * Copyright 2012-2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __Nine_patch_file_list_bin_Parser__H__
19 #define __Nine_patch_file_list_bin_Parser__H__
20 #include "iparserinfo_provider.h"
21 #include "sclres_type.h"
22 #include "string_collector.h"
23 #include "file_storage_impl.h"
24 #include "_auto_metadata.h"
26 class Nine_patch_file_list_bin_Parser {
27 static const int MAX_NINE_PATCH_FILE_LIST = 128;
29 ~Nine_patch_file_list_bin_Parser();
30 static Nine_patch_file_list_bin_Parser *get_instance();
31 void init(const FileStorage& storage, int, int, IParserInfo_Provider*);
32 bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info);
33 SclNinePatchInfo* get_nine_patch_list();
35 Nine_patch_file_list_bin_Parser();
36 void parsing_nine_patch_file_list();
38 static Nine_patch_file_list_bin_Parser *m_instance;
39 SclNinePatchInfo m_nine_patch_file_list[MAX_NINE_PATCH_FILE_LIST];
41 StringCollector m_string_collector;
42 FileStorage m_storage;
43 IParserInfo_Provider* parser_info_provider;
45 class DestructHelper {
48 if (Nine_patch_file_list_bin_Parser::m_instance != NULL)
52 static DestructHelper des;