From: yanjie.hu Date: Thu, 21 Mar 2013 08:48:48 +0000 (+0800) Subject: change class name for parsers X-Git-Tag: 2.1b_release~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4fd7807d2523b9ab6c368aa9c3dba28710cf0cb;p=platform%2Fcore%2Fuifw%2Flibscl-ui.git change class name for parsers Change-Id: I1fcebe69a1281bffb136fa5ecf40c56be34cf258 --- diff --git a/xmlresource/include/input_mode_configure_parser.h b/xmlresource/include/input_mode_configure_parser.h index 4f72df7..a901999 100644 --- a/xmlresource/include/input_mode_configure_parser.h +++ b/xmlresource/include/input_mode_configure_parser.h @@ -21,7 +21,7 @@ class InputModeConfigureParserImpl; -class Input_Mode_Configure_Parser { +class InputModeConfigParser { InputModeConfigureParserImpl *m_impl; public: int init(const char* file); @@ -30,10 +30,10 @@ class Input_Mode_Configure_Parser { const char* get_inputmode_name(int id); int get_inputmode_size(); public: - ~Input_Mode_Configure_Parser(); - static Input_Mode_Configure_Parser *get_instance(); + ~InputModeConfigParser(); + static InputModeConfigParser *get_instance(); private: - Input_Mode_Configure_Parser(); - static Input_Mode_Configure_Parser *m_instance; + InputModeConfigParser(); + static InputModeConfigParser *m_instance; }; #endif diff --git a/xmlresource/include/nine_patch_file_list_parser.h b/xmlresource/include/nine_patch_file_list_parser.h index f37deb4..16aa084 100644 --- a/xmlresource/include/nine_patch_file_list_parser.h +++ b/xmlresource/include/nine_patch_file_list_parser.h @@ -15,25 +15,25 @@ * */ -#ifndef __NinePatchFileParser_Parser__H__ -#define __NinePatchFileParser_Parser__H__ +#ifndef __NinePatchFileParser__H__ +#define __NinePatchFileParser__H__ #include "sclres_type.h" const int MAX_NINE_PATCH_FILE_LIST = 128; class NinePatchFileListParserImpl; -class NinePatchFileParser_Parser { +class NinePatchFileParser { NinePatchFileListParserImpl *m_impl; public: int init(const char* file); SclNinePatchInfo* get_nine_patch_list(); bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info); public: - ~NinePatchFileParser_Parser(); - static NinePatchFileParser_Parser *get_instance(); + ~NinePatchFileParser(); + static NinePatchFileParser *get_instance(); private: - NinePatchFileParser_Parser(); - static NinePatchFileParser_Parser *m_instance; + NinePatchFileParser(); + static NinePatchFileParser *m_instance; }; diff --git a/xmlresource/include/xmlresource.h b/xmlresource/include/xmlresource.h index 4ab1b6a..f837ff9 100644 --- a/xmlresource/include/xmlresource.h +++ b/xmlresource/include/xmlresource.h @@ -73,14 +73,14 @@ class XMLResource: public sclres::SclRes{ static XMLResource* m_instance; MainEntryParser *m_main_entry_parser; - Input_Mode_Configure_Parser *m_input_mode_configure_parser; + InputModeConfigParser *m_input_mode_configure_parser; LayoutParser *m_layout_parser; ModifierDecorationParser *m_modifier_decoration_parser; LabelPropertyParser *m_label_properties_parser; DefaultConfigParser *m_default_configure_parser; AutoPopupConfigParser *m_autopopup_configure_parser; MagnifierConfigParser *m_magnifier_configure_parser; - NinePatchFileParser_Parser *m_nine_patch_file_list_parser; + NinePatchFileParser *m_nine_patch_file_list_parser; private: class DestructHelper { diff --git a/xmlresource/input_mode_configure_parser.cpp b/xmlresource/input_mode_configure_parser.cpp index d609ac4..6a33e74 100644 --- a/xmlresource/input_mode_configure_parser.cpp +++ b/xmlresource/input_mode_configure_parser.cpp @@ -86,13 +86,13 @@ class InputModeConfigureParserImpl { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Input_Mode_Configure_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "InputModeConfigParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)INPUT_MODE_CONFIGURE_TABLE_TAG)) { - SCLLOG(SclLog::DEBUG, "Input_Mode_Configure_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "InputModeConfigParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -187,38 +187,38 @@ class InputModeConfigureParserImpl { SclInputModeConfigure m_input_mode_configure_table[MAX_SCL_INPUT_MODE]; }; -Input_Mode_Configure_Parser* Input_Mode_Configure_Parser::m_instance = NULL; +InputModeConfigParser* InputModeConfigParser::m_instance = NULL; -Input_Mode_Configure_Parser::Input_Mode_Configure_Parser() { +InputModeConfigParser::InputModeConfigParser() { m_impl = new InputModeConfigureParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create Input_Mode_Configure_Parser failed"); + SCLLOG(SclLog::ERROR, "Create InputModeConfigParser failed"); } } -Input_Mode_Configure_Parser::~Input_Mode_Configure_Parser() { +InputModeConfigParser::~InputModeConfigParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Input_Mode_Configure_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~InputModeConfigParser() has called"); delete m_impl; m_impl = NULL; } } -Input_Mode_Configure_Parser* -Input_Mode_Configure_Parser::get_instance() { +InputModeConfigParser* +InputModeConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Input_Mode_Configure_Parser(); + m_instance = new InputModeConfigParser(); } return m_instance; } int -Input_Mode_Configure_Parser::init(const char* file) { +InputModeConfigParser::init(const char* file) { return m_impl->parsing_input_mode_configure_table(file); } int -Input_Mode_Configure_Parser::get_inputmode_id(const char *name) { +InputModeConfigParser::get_inputmode_id(const char *name) { if (name == NULL) { SCLLOG(SclLog::DEBUG, "get_inputmode_id failed"); return -1; @@ -244,7 +244,7 @@ Input_Mode_Configure_Parser::get_inputmode_id(const char *name) { } const char* -Input_Mode_Configure_Parser::get_inputmode_name(int id) { +InputModeConfigParser::get_inputmode_name(int id) { if (id >= 0 && id < MAX_SCL_INPUT_MODE) { PSclInputModeConfigure config_table = get_input_mode_configure_table(); if (config_table) { @@ -256,12 +256,12 @@ Input_Mode_Configure_Parser::get_inputmode_name(int id) { } int -Input_Mode_Configure_Parser::get_inputmode_size() { +InputModeConfigParser::get_inputmode_size() { return m_impl->m_inputmode_size; } PSclInputModeConfigure -Input_Mode_Configure_Parser::get_input_mode_configure_table() { +InputModeConfigParser::get_input_mode_configure_table() { return m_impl->m_input_mode_configure_table; } diff --git a/xmlresource/nine_patch_file_list_parser.cpp b/xmlresource/nine_patch_file_list_parser.cpp index 15ebea9..40ea94d 100644 --- a/xmlresource/nine_patch_file_list_parser.cpp +++ b/xmlresource/nine_patch_file_list_parser.cpp @@ -72,7 +72,7 @@ class NinePatchFileListParserImpl { get_prop_number(cur_node, "top", &(m_nine_patch_file_list[m_size].top)); get_prop_number(cur_node, "bottom", &(m_nine_patch_file_list[m_size].bottom)); if (m_nine_patch_file_list[m_size].image_path == NULL) { - SCLLOG(SclLog::ERROR, "NinePatchFileParser_Parser: image_path should be not NULL"); + SCLLOG(SclLog::ERROR, "NinePatchFileParser: image_path should be not NULL"); } m_size++; if (m_size >= MAX_NINE_PATCH_FILE_LIST) { @@ -92,37 +92,34 @@ class NinePatchFileListParserImpl { }; -NinePatchFileParser_Parser* NinePatchFileParser_Parser::m_instance = NULL; +NinePatchFileParser* NinePatchFileParser::m_instance = NULL; -NinePatchFileParser_Parser::NinePatchFileParser_Parser() { +NinePatchFileParser::NinePatchFileParser() { m_impl = new NinePatchFileListParserImpl; - if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create NinePatchFileParser_Parser failed"); - } } -NinePatchFileParser_Parser::~NinePatchFileParser_Parser() { +NinePatchFileParser::~NinePatchFileParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~NinePatchFileParser_Parser() has called."); + SCLLOG(SclLog::MESSAGE, "~NinePatchFileParser() has called."); delete m_impl; m_impl = NULL; } } -NinePatchFileParser_Parser* -NinePatchFileParser_Parser::get_instance() { +NinePatchFileParser* +NinePatchFileParser::get_instance() { if (m_instance == NULL) { - m_instance = new NinePatchFileParser_Parser(); + m_instance = new NinePatchFileParser(); } return m_instance; } int -NinePatchFileParser_Parser::init(const char* file) { +NinePatchFileParser::init(const char* file) { return m_impl->parsing_nine_patch_file_list(file); } bool -NinePatchFileParser_Parser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) { +NinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) { if (filename == NULL) { SCLLOG(SclLog::DEBUG, "get_nine_patch_info() has failed."); return false; @@ -150,6 +147,6 @@ NinePatchFileParser_Parser::get_nine_patch_info(const char* filename, SclNinePat } SclNinePatchInfo* -NinePatchFileParser_Parser::get_nine_patch_list() { +NinePatchFileParser::get_nine_patch_list() { return m_impl->m_nine_patch_file_list; } diff --git a/xmlresource/xmlresource.cpp b/xmlresource/xmlresource.cpp index 504fe1d..4faec5c 100644 --- a/xmlresource/xmlresource.cpp +++ b/xmlresource/xmlresource.cpp @@ -85,7 +85,7 @@ get_layout_files(char **layout_files, int* size) { if (layout_files == NULL) return; int layout_file_size = 0; - Input_Mode_Configure_Parser *input_mode_configure_parser = Input_Mode_Configure_Parser::get_instance(); + InputModeConfigParser *input_mode_configure_parser = InputModeConfigParser::get_instance(); for(int inputmode = 0; inputmode < MAX_SCL_INPUT_MODE; inputmode++) { int empty_index; const sclchar* cur_layout_file; @@ -148,7 +148,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init inputmode configure\n\n"); if (m_input_mode_configure_parser == NULL) { - m_input_mode_configure_parser = Input_Mode_Configure_Parser::get_instance(); + m_input_mode_configure_parser = InputModeConfigParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.input_mode_configure); if (0 != m_input_mode_configure_parser->init(input_file)) { @@ -216,7 +216,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init nine_patch_file_list\n\n"); if (m_nine_patch_file_list_parser == NULL) { - m_nine_patch_file_list_parser = NinePatchFileParser_Parser::get_instance(); + m_nine_patch_file_list_parser = NinePatchFileParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.nine_patch_file_list);