From: yanjie.hu Date: Thu, 21 Mar 2013 03:22:25 +0000 (+0800) Subject: Change class name X-Git-Tag: 2.1b_release~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c7a373a000bcd3f338d6aefebd9ce723defb7d9;p=platform%2Fcore%2Fuifw%2Flibscl-ui.git Change class name Change-Id: I12a3a95686d8fcc75f1e825c202eee0fd72aff0c --- diff --git a/binary_xmlresource/autopopup_configure_bin_parser.cpp b/binary_xmlresource/autopopup_configure_bin_parser.cpp index b34662e..1c93ecb 100644 --- a/binary_xmlresource/autopopup_configure_bin_parser.cpp +++ b/binary_xmlresource/autopopup_configure_bin_parser.cpp @@ -20,24 +20,24 @@ using namespace std; #include "put_record.h" -AutoPopup_Configure_Bin_Parser* AutoPopup_Configure_Bin_Parser::m_instance = NULL; +BinAutoPopupConfigParser* BinAutoPopupConfigParser::m_instance = NULL; -AutoPopup_Configure_Bin_Parser::AutoPopup_Configure_Bin_Parser() { +BinAutoPopupConfigParser::BinAutoPopupConfigParser() { memset((void*)&m_autopopup_configure, 0x00, sizeof(SclAutoPopupConfigure)); } -AutoPopup_Configure_Bin_Parser::~AutoPopup_Configure_Bin_Parser() { +BinAutoPopupConfigParser::~BinAutoPopupConfigParser() { } -AutoPopup_Configure_Bin_Parser* AutoPopup_Configure_Bin_Parser::get_instance() { +BinAutoPopupConfigParser* BinAutoPopupConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new AutoPopup_Configure_Bin_Parser(); + m_instance = new BinAutoPopupConfigParser(); } return m_instance; } void -AutoPopup_Configure_Bin_Parser::decode_color(SclColor& color, int width) { +BinAutoPopupConfigParser::decode_color(SclColor& color, int width) { if (width <= 0) return; color.r = m_storage.get(width); @@ -46,7 +46,7 @@ AutoPopup_Configure_Bin_Parser::decode_color(SclColor& color, int width) { color.a = m_storage.get(width); } -void AutoPopup_Configure_Bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +void BinAutoPopupConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; @@ -54,7 +54,7 @@ void AutoPopup_Configure_Bin_Parser::init(const FileStorage& storage, int offset parsing_autopopup_configure(); } -void AutoPopup_Configure_Bin_Parser::parsing_autopopup_configure() { +void BinAutoPopupConfigParser::parsing_autopopup_configure() { Autopopup_configure_width record_width; set_autopopup_configure_width(*parser_info_provider, record_width); @@ -122,6 +122,6 @@ void AutoPopup_Configure_Bin_Parser::parsing_autopopup_configure() { #endif } -PSclAutoPopupConfigure AutoPopup_Configure_Bin_Parser::get_autopopup_configure() { +PSclAutoPopupConfigure BinAutoPopupConfigParser::get_autopopup_configure() { return &m_autopopup_configure; } diff --git a/binary_xmlresource/binary_xmlresource.cpp b/binary_xmlresource/binary_xmlresource.cpp index cb8e4ef..a83b842 100644 --- a/binary_xmlresource/binary_xmlresource.cpp +++ b/binary_xmlresource/binary_xmlresource.cpp @@ -26,9 +26,9 @@ using namespace binary_xmlresource; -BinXmlResource* BinXmlResource::m_instance = NULL; +BinResource* BinResource::m_instance = NULL; -BinXmlResource::BinXmlResource() { +BinResource::BinResource() { m_input_mode_configure_parser = NULL; m_layout_parser = NULL; m_key_coordinate_frame_parser = NULL; @@ -40,7 +40,7 @@ BinXmlResource::BinXmlResource() { m_nine_patch_file_list_parser = NULL; } -BinXmlResource::~BinXmlResource() { +BinResource::~BinResource() { if (m_input_mode_configure_parser) delete m_input_mode_configure_parser; m_input_mode_configure_parser = NULL; @@ -74,14 +74,14 @@ BinXmlResource::~BinXmlResource() { m_nine_patch_file_list_parser = NULL; } -BinXmlResource* BinXmlResource::get_instance() { +BinResource* BinResource::get_instance() { if (m_instance == NULL) { - m_instance = new BinXmlResource(); + m_instance = new BinResource(); } return m_instance; } -void BinXmlResource::init(const char *entry_filepath) { +void BinResource::init(const char *entry_filepath) { SCLLOG_TIME_BEGIN(); char path[_POSIX_PATH_MAX] = {0}; @@ -120,110 +120,110 @@ void BinXmlResource::init(const char *entry_filepath) { ParserInfo_Provider parser_info_provider(&metadataProvider, &stringProvider); if (m_input_mode_configure_parser == NULL) { - m_input_mode_configure_parser = Input_Mode_Configure_Bin_Parser::get_instance(); + m_input_mode_configure_parser = BinInputModeConfigParser::get_instance(); m_input_mode_configure_parser->init(storageAllData, info[INPUT_MODE_CONFIGURE].offset, info[INPUT_MODE_CONFIGURE].size, &parser_info_provider); } if (m_default_configure_parser == NULL) { - m_default_configure_parser = Default_Configure_Bin_Parser::get_instance(); + m_default_configure_parser = BinDefaultConfigParser::get_instance(); m_default_configure_parser->init(storageAllData, info[DEFAULT_CONFIGURE].offset, info[DEFAULT_CONFIGURE].size, &parser_info_provider); } if (m_key_coordinate_frame_parser == NULL) { - m_key_coordinate_frame_parser = Key_coordinate_frame_bin_Parser::get_instance(); + m_key_coordinate_frame_parser = BinKeyCoordFrameParser::get_instance(); m_key_coordinate_frame_parser->init(storageAllData, info[KEY_COORDINATE_FRAME].offset, info[KEY_COORDINATE_FRAME].size, &parser_info_provider); } if (m_layout_parser == NULL) { - m_layout_parser = Layout_Bin_Parser::get_instance(); + m_layout_parser = BinLayoutParser::get_instance(); m_layout_parser->init(storageAllData, info[LAYOUT].offset, info[LAYOUT].size, &parser_info_provider); } if (m_modifier_decoration_parser == NULL) { - m_modifier_decoration_parser = Modifier_decoration_bin_Parser::get_instance(); + m_modifier_decoration_parser = BinModifierDecorationParser::get_instance(); m_modifier_decoration_parser->init(storageAllData, info[MODIFIER_DECORATION].offset, info[MODIFIER_DECORATION].size, &parser_info_provider); } if (m_label_properties_parser == NULL) { - m_label_properties_parser = Label_properties_bin_Parser::get_instance(); + m_label_properties_parser = BinLabelPropertyParser::get_instance(); m_label_properties_parser->init(storageAllData, info[LABEL_PROPERTIES_FRAME].offset, info[LABEL_PROPERTIES_FRAME].size, &parser_info_provider); } if (m_autopopup_configure_parser == NULL) { - m_autopopup_configure_parser = AutoPopup_Configure_Bin_Parser::get_instance(); + m_autopopup_configure_parser = BinAutoPopupConfigParser::get_instance(); m_autopopup_configure_parser->init(storageAllData, info[AUTOPOPUP_CONFIGURE].offset, info[AUTOPOPUP_CONFIGURE].size, &parser_info_provider); } if (m_magnifier_configure_parser == NULL) { - m_magnifier_configure_parser = Magnifier_Configure_Bin_Parser::get_instance(); + m_magnifier_configure_parser = BinMagnifierConfigParser::get_instance(); m_magnifier_configure_parser->init(storageAllData, info[MAGNIFIER_CONFIGURE].offset, info[MAGNIFIER_CONFIGURE].size, &parser_info_provider); } if (m_nine_patch_file_list_parser == NULL) { - m_nine_patch_file_list_parser = Nine_patch_file_list_bin_Parser::get_instance(); + m_nine_patch_file_list_parser = BinNinePatchFileParser::get_instance(); m_nine_patch_file_list_parser->init(storageAllData, info[NINE_PATCH].offset, info[NINE_PATCH].size, &parser_info_provider); } SCLLOG_TIME_END("Parsing binary XML files"); } -void BinXmlResource::load(int layout_id) { +void BinResource::load(int layout_id) { //m_layout_parser->load(layout_id); m_key_coordinate_frame_parser->load(layout_id); } -void BinXmlResource::unload() { +void BinResource::unload() { //m_layout_parser->unload(); m_key_coordinate_frame_parser->unload(); } -bool BinXmlResource::loaded(int layout_id) { +bool BinResource::loaded(int layout_id) { //return m_layout_parser->loaded(layout_id); return m_key_coordinate_frame_parser->loaded(layout_id); } -int BinXmlResource::get_labelproperty_size() { +int BinResource::get_labelproperty_size() { return m_label_properties_parser->get_size(); } -bool BinXmlResource::get_nine_patch_info(const char *filename, SclNinePatchInfo *info) { +bool BinResource::get_nine_patch_info(const char *filename, SclNinePatchInfo *info) { return m_nine_patch_file_list_parser->get_nine_patch_info(filename, info); } -int BinXmlResource::get_inputmode_id(const char *name) { +int BinResource::get_inputmode_id(const char *name) { return m_input_mode_configure_parser->get_inputmode_id(name); } -const char* BinXmlResource::get_inputmode_name(int id) { +const char* BinResource::get_inputmode_name(int id) { return m_input_mode_configure_parser->get_inputmode_name(id); } -int BinXmlResource::get_inputmode_size() { +int BinResource::get_inputmode_size() { return m_input_mode_configure_parser->get_inputmode_size(); } -PSclInputModeConfigure BinXmlResource::get_input_mode_configure_table() { +PSclInputModeConfigure BinResource::get_input_mode_configure_table() { return m_input_mode_configure_parser->get_input_mode_configure_table(); } -int BinXmlResource::get_layout_id(const char *name) { +int BinResource::get_layout_id(const char *name) { return m_layout_parser->get_layout_index(name); } -int BinXmlResource::get_layout_size() { +int BinResource::get_layout_size() { return m_layout_parser->get_layout_size(); } -int BinXmlResource::get_modifier_decoration_id(const char *name) { +int BinResource::get_modifier_decoration_id(const char *name) { return m_modifier_decoration_parser->get_modifier_decoration_id(name); } -PSclLayout BinXmlResource::get_layout_table() { +PSclLayout BinResource::get_layout_table() { return m_layout_parser->get_layout_table(); } -PSclLayoutKeyCoordinatePointerTable BinXmlResource::get_key_coordinate_pointer_frame() { +PSclLayoutKeyCoordinatePointerTable BinResource::get_key_coordinate_pointer_frame() { return m_layout_parser->get_key_coordinate_pointer_frame(); } -PSclModifierDecoration BinXmlResource::get_modifier_decoration_table() { +PSclModifierDecoration BinResource::get_modifier_decoration_table() { return m_modifier_decoration_parser->get_modifier_decoration_table(); } -PSclLabelPropertiesTable BinXmlResource::get_label_properties_frame() { +PSclLabelPropertiesTable BinResource::get_label_properties_frame() { return m_label_properties_parser->get_label_properties_frame(); } -PSclDefaultConfigure BinXmlResource::get_default_configure() { +PSclDefaultConfigure BinResource::get_default_configure() { return m_default_configure_parser->get_default_configure(); } -PSclAutoPopupConfigure BinXmlResource::get_autopopup_configure() { +PSclAutoPopupConfigure BinResource::get_autopopup_configure() { return m_autopopup_configure_parser->get_autopopup_configure(); } -PSclMagnifierWndConfigure BinXmlResource::get_magnifier_configure() { +PSclMagnifierWndConfigure BinResource::get_magnifier_configure() { return m_magnifier_configure_parser->get_magnifier_configure(); } diff --git a/binary_xmlresource/default_configure_bin_parser.cpp b/binary_xmlresource/default_configure_bin_parser.cpp index 851f9b1..0de483e 100644 --- a/binary_xmlresource/default_configure_bin_parser.cpp +++ b/binary_xmlresource/default_configure_bin_parser.cpp @@ -20,30 +20,30 @@ using namespace std; #include "put_record.h" -Default_Configure_Bin_Parser* Default_Configure_Bin_Parser::m_instance = NULL; +BinDefaultConfigParser* BinDefaultConfigParser::m_instance = NULL; -Default_Configure_Bin_Parser::Default_Configure_Bin_Parser() { +BinDefaultConfigParser::BinDefaultConfigParser() { memset((void*)&m_default_configure, 0x00, sizeof(SclDefaultConfigure)); } -Default_Configure_Bin_Parser::~Default_Configure_Bin_Parser() { +BinDefaultConfigParser::~BinDefaultConfigParser() { } -Default_Configure_Bin_Parser* Default_Configure_Bin_Parser::get_instance() { +BinDefaultConfigParser* BinDefaultConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Default_Configure_Bin_Parser(); + m_instance = new BinDefaultConfigParser(); } return m_instance; } -void Default_Configure_Bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +void BinDefaultConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; parsing_default_configure(); } void -Default_Configure_Bin_Parser::decode_color(SclColor& color, int width) { +BinDefaultConfigParser::decode_color(SclColor& color, int width) { if (width <= 0) return; color.r = m_storage.get(width); @@ -52,7 +52,7 @@ Default_Configure_Bin_Parser::decode_color(SclColor& color, int width) { color.a = m_storage.get(width); } -void Default_Configure_Bin_Parser::parsing_default_configure() { +void BinDefaultConfigParser::parsing_default_configure() { PSclDefaultConfigure cur = &m_default_configure; @@ -123,7 +123,7 @@ void Default_Configure_Bin_Parser::parsing_default_configure() { #endif } -PSclDefaultConfigure Default_Configure_Bin_Parser::get_default_configure() { +PSclDefaultConfigure BinDefaultConfigParser::get_default_configure() { return &m_default_configure; } diff --git a/binary_xmlresource/include/autopopup_configure_bin_parser.h b/binary_xmlresource/include/autopopup_configure_bin_parser.h index ff0d016..5bb455c 100644 --- a/binary_xmlresource/include/autopopup_configure_bin_parser.h +++ b/binary_xmlresource/include/autopopup_configure_bin_parser.h @@ -15,28 +15,28 @@ * */ -#ifndef __AutoPopup_Configure_Bin_Parser__H__ -#define __AutoPopup_Configure_Bin_Parser__H__ +#ifndef __BinAutoPopupConfigParser__H__ +#define __BinAutoPopupConfigParser__H__ #include "sclres_type.h" #include "string_collector.h" #include "iparserinfo_provider.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class AutoPopup_Configure_Bin_Parser { +class BinAutoPopupConfigParser { public: - ~AutoPopup_Configure_Bin_Parser(); - static AutoPopup_Configure_Bin_Parser *get_instance(); + ~BinAutoPopupConfigParser(); + static BinAutoPopupConfigParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); PSclAutoPopupConfigure get_autopopup_configure(); private: - AutoPopup_Configure_Bin_Parser(); + BinAutoPopupConfigParser(); void parsing_autopopup_configure(); void decode_color(SclColor&, int width); private: - static AutoPopup_Configure_Bin_Parser *m_instance; + static BinAutoPopupConfigParser *m_instance; SclAutoPopupConfigure m_autopopup_configure; StringCollector m_string_collector; FileStorage m_storage; @@ -45,7 +45,7 @@ private: class DestructHelper { public: ~DestructHelper() { - if (AutoPopup_Configure_Bin_Parser::m_instance != NULL) + if (BinAutoPopupConfigParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/binary_xmlresource.h b/binary_xmlresource/include/binary_xmlresource.h index f1f2125..bf8dae0 100644 --- a/binary_xmlresource/include/binary_xmlresource.h +++ b/binary_xmlresource/include/binary_xmlresource.h @@ -52,10 +52,10 @@ enum{ MAX_DATATYPE }; namespace binary_xmlresource{ -class BinXmlResource: public sclres::SclRes{ +class BinResource: public sclres::SclRes{ public: - ~BinXmlResource(); - static BinXmlResource* get_instance(); + ~BinResource(); + static BinResource* get_instance(); void init(const char *entry_filepath); /* These functions are for dynamic (lazy) loading layouts */ @@ -89,26 +89,26 @@ class BinXmlResource: public sclres::SclRes{ void destroy(); struct info_t info[MAX_DATATYPE]; private: - BinXmlResource(); + BinResource(); private: - static BinXmlResource* m_instance; + static BinResource* m_instance; - Input_Mode_Configure_Bin_Parser *m_input_mode_configure_parser; - Layout_Bin_Parser *m_layout_parser; - Key_coordinate_frame_bin_Parser *m_key_coordinate_frame_parser; - Modifier_decoration_bin_Parser *m_modifier_decoration_parser; - Label_properties_bin_Parser *m_label_properties_parser; - Default_Configure_Bin_Parser *m_default_configure_parser; - AutoPopup_Configure_Bin_Parser *m_autopopup_configure_parser; - Magnifier_Configure_Bin_Parser *m_magnifier_configure_parser; - Nine_patch_file_list_bin_Parser *m_nine_patch_file_list_parser; + BinInputModeConfigParser *m_input_mode_configure_parser; + BinLayoutParser *m_layout_parser; + BinKeyCoordFrameParser *m_key_coordinate_frame_parser; + BinModifierDecorationParser *m_modifier_decoration_parser; + BinLabelPropertyParser *m_label_properties_parser; + BinDefaultConfigParser *m_default_configure_parser; + BinAutoPopupConfigParser *m_autopopup_configure_parser; + BinMagnifierConfigParser *m_magnifier_configure_parser; + BinNinePatchFileParser *m_nine_patch_file_list_parser; private: class DestructHelper { public: ~DestructHelper() { - if (BinXmlResource::m_instance != NULL) + if (BinResource::m_instance != NULL) { delete m_instance; m_instance = NULL; diff --git a/binary_xmlresource/include/default_configure_bin_parser.h b/binary_xmlresource/include/default_configure_bin_parser.h index 6c81878..4bae92e 100644 --- a/binary_xmlresource/include/default_configure_bin_parser.h +++ b/binary_xmlresource/include/default_configure_bin_parser.h @@ -22,10 +22,10 @@ #include "iparserinfo_provider.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class Default_Configure_Bin_Parser { +class BinDefaultConfigParser { public: - ~Default_Configure_Bin_Parser(); - static Default_Configure_Bin_Parser *get_instance(); + ~BinDefaultConfigParser(); + static BinDefaultConfigParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); PSclDefaultConfigure get_default_configure(); @@ -33,11 +33,11 @@ public: //These private methods for parsing private: - Default_Configure_Bin_Parser(); + BinDefaultConfigParser(); void parsing_default_configure(); void decode_color(SclColor&, int width); private: - static Default_Configure_Bin_Parser *m_instance; + static BinDefaultConfigParser *m_instance; SclDefaultConfigure m_default_configure; StringCollector m_string_collector; IParserInfo_Provider* parser_info_provider; @@ -46,7 +46,7 @@ private: class DestructHelper { public: ~DestructHelper() { - if (Default_Configure_Bin_Parser::m_instance != NULL) + if (BinDefaultConfigParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/input_mode_configure_bin_parser.h b/binary_xmlresource/include/input_mode_configure_bin_parser.h index 80aa292..33d02c8 100644 --- a/binary_xmlresource/include/input_mode_configure_bin_parser.h +++ b/binary_xmlresource/include/input_mode_configure_bin_parser.h @@ -25,10 +25,10 @@ #include "string_collector.h" #include "_auto_metadata.h" -class Input_Mode_Configure_Bin_Parser { +class BinInputModeConfigParser { public: - ~Input_Mode_Configure_Bin_Parser(); - static Input_Mode_Configure_Bin_Parser *get_instance(); + ~BinInputModeConfigParser(); + static BinInputModeConfigParser *get_instance(); void init(const FileStorage&, int, int, IParserInfo_Provider* parser_info_provider); PSclInputModeConfigure get_input_mode_configure_table(); int get_inputmode_id(const char *name); @@ -37,13 +37,13 @@ class Input_Mode_Configure_Bin_Parser { void decode_string(FileStorage &storage, char** p, int width); private: - Input_Mode_Configure_Bin_Parser(); + BinInputModeConfigParser(); void parsing_input_mode_configure_table(); void set_input_mode_configure_default_record(const PSclInputModeConfigure); StringCollector m_string_collector; private: - static Input_Mode_Configure_Bin_Parser *m_instance; + static BinInputModeConfigParser *m_instance; int m_inputmode_size; SclInputModeConfigure m_input_mode_configure_table[MAX_SCL_INPUT_MODE]; diff --git a/binary_xmlresource/include/key_coordinate_frame_bin_parser.h b/binary_xmlresource/include/key_coordinate_frame_bin_parser.h index 0246824..2cbfdf3 100644 --- a/binary_xmlresource/include/key_coordinate_frame_bin_parser.h +++ b/binary_xmlresource/include/key_coordinate_frame_bin_parser.h @@ -23,23 +23,23 @@ #include "string_collector.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class Key_coordinate_frame_bin_Parser { +class BinKeyCoordFrameParser { public: - static Key_coordinate_frame_bin_Parser *get_instance(); + static BinKeyCoordFrameParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); - ~Key_coordinate_frame_bin_Parser(); + ~BinKeyCoordFrameParser(); PSclLayoutKeyCoordinatePointerTable get_key_coordinate_pointer_frame(); void load(int); bool loaded(int); void unload(); private: - Key_coordinate_frame_bin_Parser(); + BinKeyCoordFrameParser(); void parsing_key_coordinate_frame(); void decode_key_coordinate_record(FileStorage& storage, const PSclLayoutKeyCoordinate cur, const Key_coordinate_record_width&); private: - static Key_coordinate_frame_bin_Parser *m_instance; + static BinKeyCoordFrameParser *m_instance; SclLayoutKeyCoordinate* m_key_coordinate_pointer_frame[MAX_SCL_LAYOUT][MAX_KEY]; IParserInfo_Provider *parser_info_provider; @@ -49,7 +49,7 @@ class Key_coordinate_frame_bin_Parser { class DestructHelper { public: ~DestructHelper() { - if (Key_coordinate_frame_bin_Parser::m_instance != NULL) + if (BinKeyCoordFrameParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/label_properties_bin_parser.h b/binary_xmlresource/include/label_properties_bin_parser.h index 249e7dd..114c665 100644 --- a/binary_xmlresource/include/label_properties_bin_parser.h +++ b/binary_xmlresource/include/label_properties_bin_parser.h @@ -15,8 +15,8 @@ * */ -#ifndef __Label_properties_bin_Parser__H__ -#define __Label_properties_bin_Parser__H__ +#ifndef __BinLabelPropertyParser__H__ +#define __BinLabelPropertyParser__H__ #include "sclres_type.h" #include "iparserinfo_provider.h" #include @@ -24,23 +24,23 @@ #include "file_storage_impl.h" #include "_auto_metadata.h" -class Label_properties_bin_Parser { +class BinLabelPropertyParser { public: - ~Label_properties_bin_Parser(); - static Label_properties_bin_Parser *get_instance(); + ~BinLabelPropertyParser(); + static BinLabelPropertyParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); PSclLabelPropertiesTable get_label_properties_frame(); const int get_size(); private: - Label_properties_bin_Parser(); + BinLabelPropertyParser(); void parsing_label_properties_frame(); void decode_label_properties_record(const PSclLabelProperties cur, const Label_properties_record_width&); void decode_color(SclColor& color, int width); private: - static Label_properties_bin_Parser *m_instance; + static BinLabelPropertyParser *m_instance; SclLabelProperties m_label_properties_frame[MAX_SCL_LABEL_PROPERTIES][MAX_SIZE_OF_LABEL_FOR_ONE]; int m_size; IParserInfo_Provider *parser_info_provider; @@ -50,7 +50,7 @@ class Label_properties_bin_Parser { class DestructHelper { public: ~DestructHelper() { - if (Label_properties_bin_Parser::m_instance != NULL) + if (BinLabelPropertyParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/layout_bin_parser.h b/binary_xmlresource/include/layout_bin_parser.h index 47fc582..0865ed9 100644 --- a/binary_xmlresource/include/layout_bin_parser.h +++ b/binary_xmlresource/include/layout_bin_parser.h @@ -23,9 +23,9 @@ #include "string_collector.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class Layout_Bin_Parser { +class BinLayoutParser { public: - static Layout_Bin_Parser *get_instance(); + static BinLayoutParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); int get_layout_index(const char *name); @@ -33,15 +33,15 @@ class Layout_Bin_Parser { PSclLayout get_layout_table(); PSclLayoutKeyCoordinatePointerTable get_key_coordinate_pointer_frame(); - ~Layout_Bin_Parser(); + ~BinLayoutParser(); private: - Layout_Bin_Parser(); + BinLayoutParser(); void parsing_layout_table(); void decode_layout_record(SclLayout& cur, const Layout_width&); void decode_color(SclColor&, int width); private: - static Layout_Bin_Parser *m_instance; + static BinLayoutParser *m_instance; int m_layout_size; SclLayout m_layout_table[MAX_SCL_LAYOUT]; @@ -52,7 +52,7 @@ class Layout_Bin_Parser { class DestructHelper { public: ~DestructHelper() { - if (Layout_Bin_Parser::m_instance != NULL) + if (BinLayoutParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/magnifier_configure_bin_parser.h b/binary_xmlresource/include/magnifier_configure_bin_parser.h index d3bb2d3..f082a14 100644 --- a/binary_xmlresource/include/magnifier_configure_bin_parser.h +++ b/binary_xmlresource/include/magnifier_configure_bin_parser.h @@ -15,27 +15,27 @@ * */ -#ifndef __Magnifier_Configure_Bin_Parser__H__ -#define __Magnifier_Configure_Bin_Parser__H__ +#ifndef __BinMagnifierConfigParser__H__ +#define __BinMagnifierConfigParser__H__ #include "sclres_type.h" #include "string_collector.h" #include "iparserinfo_provider.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class Magnifier_Configure_Bin_Parser { +class BinMagnifierConfigParser { public: - ~Magnifier_Configure_Bin_Parser(); - static Magnifier_Configure_Bin_Parser *get_instance(); + ~BinMagnifierConfigParser(); + static BinMagnifierConfigParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); PSclMagnifierWndConfigure get_magnifier_configure(); private: - Magnifier_Configure_Bin_Parser(); + BinMagnifierConfigParser(); void parsing_magnifier_configure(); private: - static Magnifier_Configure_Bin_Parser *m_instance; + static BinMagnifierConfigParser *m_instance; SclMagnifierWndConfigure m_magnifier_configure; StringCollector m_string_collector; FileStorage m_storage; @@ -45,7 +45,7 @@ private: class DestructHelper { public: ~DestructHelper() { - if (Magnifier_Configure_Bin_Parser::m_instance != NULL) + if (BinMagnifierConfigParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/modifier_decoration_bin_parser.h b/binary_xmlresource/include/modifier_decoration_bin_parser.h index 8784454..35490bb 100644 --- a/binary_xmlresource/include/modifier_decoration_bin_parser.h +++ b/binary_xmlresource/include/modifier_decoration_bin_parser.h @@ -15,8 +15,8 @@ * */ -#ifndef __Modifier_decoration_bin_Parser__H__ -#define __Modifier_decoration_bin_Parser__H__ +#ifndef __BinModifierDecorationParser__H__ +#define __BinModifierDecorationParser__H__ #include #include "sclres_type.h" #include "iparserinfo_provider.h" @@ -25,19 +25,19 @@ #include "file_storage_impl.h" #include "_auto_metadata.h" -class Modifier_decoration_bin_Parser { +class BinModifierDecorationParser { public: - ~Modifier_decoration_bin_Parser(); - static Modifier_decoration_bin_Parser *get_instance(); + ~BinModifierDecorationParser(); + static BinModifierDecorationParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); PSclModifierDecoration get_modifier_decoration_table(); int get_modifier_decoration_id(const char *name); private: - Modifier_decoration_bin_Parser(); + BinModifierDecorationParser(); void parsing_modifier_decoration_table(); private: - static Modifier_decoration_bin_Parser *m_instance; + static BinModifierDecorationParser *m_instance; SclModifierDecoration m_modifier_decoration_table[MAX_SCL_MODIFIER_DECORATION_NUM]; IParserInfo_Provider *parser_info_provider; @@ -47,7 +47,7 @@ class Modifier_decoration_bin_Parser { class DestructHelper { public: ~DestructHelper() { - if (Modifier_decoration_bin_Parser::m_instance != NULL) + if (BinModifierDecorationParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/include/nine_patch_file_list_bin_parser.h b/binary_xmlresource/include/nine_patch_file_list_bin_parser.h index 0fbc434..5bd5c0d 100644 --- a/binary_xmlresource/include/nine_patch_file_list_bin_parser.h +++ b/binary_xmlresource/include/nine_patch_file_list_bin_parser.h @@ -15,27 +15,27 @@ * */ -#ifndef __Nine_patch_file_list_bin_Parser__H__ -#define __Nine_patch_file_list_bin_Parser__H__ +#ifndef __BinNinePatchFileParser__H__ +#define __BinNinePatchFileParser__H__ #include "iparserinfo_provider.h" #include "sclres_type.h" #include "string_collector.h" #include "file_storage_impl.h" #include "_auto_metadata.h" -class Nine_patch_file_list_bin_Parser { +class BinNinePatchFileParser { static const int MAX_NINE_PATCH_FILE_LIST = 128; public: - ~Nine_patch_file_list_bin_Parser(); - static Nine_patch_file_list_bin_Parser *get_instance(); + ~BinNinePatchFileParser(); + static BinNinePatchFileParser *get_instance(); void init(const FileStorage& storage, int, int, IParserInfo_Provider*); bool get_nine_patch_info(const char *filename, SclNinePatchInfo *info); SclNinePatchInfo* get_nine_patch_list(); private: - Nine_patch_file_list_bin_Parser(); + BinNinePatchFileParser(); void parsing_nine_patch_file_list(); private: - static Nine_patch_file_list_bin_Parser *m_instance; + static BinNinePatchFileParser *m_instance; SclNinePatchInfo m_nine_patch_file_list[MAX_NINE_PATCH_FILE_LIST]; int m_size; StringCollector m_string_collector; @@ -45,7 +45,7 @@ class Nine_patch_file_list_bin_Parser { class DestructHelper { public: ~DestructHelper() { - if (Nine_patch_file_list_bin_Parser::m_instance != NULL) + if (BinNinePatchFileParser::m_instance != NULL) delete m_instance; } }; diff --git a/binary_xmlresource/input_mode_configure_bin_parser.cpp b/binary_xmlresource/input_mode_configure_bin_parser.cpp index da4874b..2c2b0ce 100644 --- a/binary_xmlresource/input_mode_configure_bin_parser.cpp +++ b/binary_xmlresource/input_mode_configure_bin_parser.cpp @@ -19,26 +19,26 @@ #include "simple_debug.h" #include "put_record.h" using namespace std; -Input_Mode_Configure_Bin_Parser* Input_Mode_Configure_Bin_Parser::m_instance = NULL; +BinInputModeConfigParser* BinInputModeConfigParser::m_instance = NULL; -Input_Mode_Configure_Bin_Parser::Input_Mode_Configure_Bin_Parser() { +BinInputModeConfigParser::BinInputModeConfigParser() { m_inputmode_size = 0; memset(m_input_mode_configure_table, 0x00, sizeof(SclInputModeConfigure) * MAX_SCL_INPUT_MODE); } -Input_Mode_Configure_Bin_Parser::~Input_Mode_Configure_Bin_Parser() { +BinInputModeConfigParser::~BinInputModeConfigParser() { } -Input_Mode_Configure_Bin_Parser* -Input_Mode_Configure_Bin_Parser::get_instance() { +BinInputModeConfigParser* +BinInputModeConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Input_Mode_Configure_Bin_Parser(); + m_instance = new BinInputModeConfigParser(); } return m_instance; } void -Input_Mode_Configure_Bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +BinInputModeConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; @@ -46,7 +46,7 @@ Input_Mode_Configure_Bin_Parser::init(const FileStorage& storage, int offset, in } int -Input_Mode_Configure_Bin_Parser::get_inputmode_id(const char *name) { +BinInputModeConfigParser::get_inputmode_id(const char *name) { if (name == NULL) return -1; for(int i = 0; i < MAX_SCL_INPUT_MODE; ++i) { @@ -61,7 +61,7 @@ Input_Mode_Configure_Bin_Parser::get_inputmode_id(const char *name) { } const char* -Input_Mode_Configure_Bin_Parser::get_inputmode_name(int id) { +BinInputModeConfigParser::get_inputmode_name(int id) { if (id >= 0 && id < MAX_SCL_INPUT_MODE) { return m_input_mode_configure_table[id].name; } @@ -70,12 +70,12 @@ Input_Mode_Configure_Bin_Parser::get_inputmode_name(int id) { } int -Input_Mode_Configure_Bin_Parser::get_inputmode_size() { +BinInputModeConfigParser::get_inputmode_size() { return m_inputmode_size; } void -Input_Mode_Configure_Bin_Parser::parsing_input_mode_configure_table() { +BinInputModeConfigParser::parsing_input_mode_configure_table() { // skip data_size m_storage.advance(8); @@ -111,7 +111,7 @@ Input_Mode_Configure_Bin_Parser::parsing_input_mode_configure_table() { } PSclInputModeConfigure -Input_Mode_Configure_Bin_Parser::get_input_mode_configure_table() { +BinInputModeConfigParser::get_input_mode_configure_table() { return m_input_mode_configure_table; } diff --git a/binary_xmlresource/key_coordinate_frame_bin_parser.cpp b/binary_xmlresource/key_coordinate_frame_bin_parser.cpp index da32e0d..4e3a6fe 100644 --- a/binary_xmlresource/key_coordinate_frame_bin_parser.cpp +++ b/binary_xmlresource/key_coordinate_frame_bin_parser.cpp @@ -32,12 +32,12 @@ using namespace binary_xmlresource; using namespace std; using namespace scl; -Key_coordinate_frame_bin_Parser* Key_coordinate_frame_bin_Parser::m_instance = NULL; +BinKeyCoordFrameParser* BinKeyCoordFrameParser::m_instance = NULL; -Key_coordinate_frame_bin_Parser::Key_coordinate_frame_bin_Parser() { +BinKeyCoordFrameParser::BinKeyCoordFrameParser() { memset(m_key_coordinate_pointer_frame, 0x00, sizeof(SclLayoutKeyCoordinatePointer) * MAX_SCL_LAYOUT * MAX_KEY); } -Key_coordinate_frame_bin_Parser::~Key_coordinate_frame_bin_Parser() { +BinKeyCoordFrameParser::~BinKeyCoordFrameParser() { for (int i = 0; i < MAX_SCL_LAYOUT; ++i) { for (int j = 0; j < MAX_KEY; ++j) { free(m_key_coordinate_pointer_frame[i][j]); @@ -45,18 +45,18 @@ Key_coordinate_frame_bin_Parser::~Key_coordinate_frame_bin_Parser() { } } } -Key_coordinate_frame_bin_Parser* Key_coordinate_frame_bin_Parser::get_instance() { +BinKeyCoordFrameParser* BinKeyCoordFrameParser::get_instance() { if (m_instance == NULL) { - m_instance = new Key_coordinate_frame_bin_Parser(); + m_instance = new BinKeyCoordFrameParser(); } return m_instance; } void -Key_coordinate_frame_bin_Parser:: +BinKeyCoordFrameParser:: load(int layout_id) { - BinXmlResource *bin_xmlres = BinXmlResource::get_instance(); + BinResource *bin_xmlres = BinResource::get_instance(); int layout_data_offset = bin_xmlres->info[LAYOUT].offset; char path[_POSIX_PATH_MAX] = {0}; @@ -126,7 +126,7 @@ load(int layout_id) } bool -Key_coordinate_frame_bin_Parser:: +BinKeyCoordFrameParser:: loaded(int layout_id) { bool ret = TRUE; @@ -139,7 +139,7 @@ loaded(int layout_id) } void -Key_coordinate_frame_bin_Parser:: +BinKeyCoordFrameParser:: unload() { for (int i = 0; i < MAX_SCL_LAYOUT; ++i) { @@ -150,19 +150,19 @@ unload() } } void -Key_coordinate_frame_bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +BinKeyCoordFrameParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; } PSclLayoutKeyCoordinatePointerTable -Key_coordinate_frame_bin_Parser::get_key_coordinate_pointer_frame() { +BinKeyCoordFrameParser::get_key_coordinate_pointer_frame() { return m_key_coordinate_pointer_frame; } void -Key_coordinate_frame_bin_Parser::decode_key_coordinate_record(FileStorage& storage, const PSclLayoutKeyCoordinate cur, const Key_coordinate_record_width& record_width) { +BinKeyCoordFrameParser::decode_key_coordinate_record(FileStorage& storage, const PSclLayoutKeyCoordinate cur, const Key_coordinate_record_width& record_width) { int width = 0; cur->valid = (sclboolean)true; diff --git a/binary_xmlresource/label_properties_bin_parser.cpp b/binary_xmlresource/label_properties_bin_parser.cpp index 11ac35a..98888d2 100644 --- a/binary_xmlresource/label_properties_bin_parser.cpp +++ b/binary_xmlresource/label_properties_bin_parser.cpp @@ -18,40 +18,40 @@ #include "label_properties_bin_parser.h" #include "simple_debug.h" #include "put_record.h" -Label_properties_bin_Parser* Label_properties_bin_Parser::m_instance = NULL; +BinLabelPropertyParser* BinLabelPropertyParser::m_instance = NULL; -Label_properties_bin_Parser::Label_properties_bin_Parser() { +BinLabelPropertyParser::BinLabelPropertyParser() { m_size = 0; memset(m_label_properties_frame, 0, sizeof(SclLabelProperties) * MAX_SCL_LABEL_PROPERTIES * MAX_SIZE_OF_LABEL_FOR_ONE); } -Label_properties_bin_Parser::~Label_properties_bin_Parser() { +BinLabelPropertyParser::~BinLabelPropertyParser() { m_size = 0; } -Label_properties_bin_Parser* Label_properties_bin_Parser::get_instance() { +BinLabelPropertyParser* BinLabelPropertyParser::get_instance() { if (m_instance == NULL) { - m_instance = new Label_properties_bin_Parser(); + m_instance = new BinLabelPropertyParser(); } return m_instance; } -void Label_properties_bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +void BinLabelPropertyParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; parsing_label_properties_frame(); } const int -Label_properties_bin_Parser::get_size() { +BinLabelPropertyParser::get_size() { return m_size; } //recompute_layout will change the table -PSclLabelPropertiesTable Label_properties_bin_Parser::get_label_properties_frame() { +PSclLabelPropertiesTable BinLabelPropertyParser::get_label_properties_frame() { return m_label_properties_frame; } -void Label_properties_bin_Parser::parsing_label_properties_frame() { +void BinLabelPropertyParser::parsing_label_properties_frame() { // skip data_size m_storage.advance(8); @@ -77,7 +77,7 @@ void Label_properties_bin_Parser::parsing_label_properties_frame() { } void -Label_properties_bin_Parser::decode_color(SclColor& color, int width) { +BinLabelPropertyParser::decode_color(SclColor& color, int width) { if (width <= 0) return; color.r = m_storage.get(width); @@ -86,7 +86,7 @@ Label_properties_bin_Parser::decode_color(SclColor& color, int width) { color.a = m_storage.get(width); } void -Label_properties_bin_Parser::decode_label_properties_record(const PSclLabelProperties cur, const Label_properties_record_width& record_width) { +BinLabelPropertyParser::decode_label_properties_record(const PSclLabelProperties cur, const Label_properties_record_width& record_width) { cur->valid = (sclboolean)true; //label_name diff --git a/binary_xmlresource/layout_bin_parser.cpp b/binary_xmlresource/layout_bin_parser.cpp index 2588acf..f8de5b5 100644 --- a/binary_xmlresource/layout_bin_parser.cpp +++ b/binary_xmlresource/layout_bin_parser.cpp @@ -25,24 +25,24 @@ using namespace std; using namespace scl; -Layout_Bin_Parser* Layout_Bin_Parser::m_instance = NULL; +BinLayoutParser* BinLayoutParser::m_instance = NULL; -Layout_Bin_Parser:: -Layout_Bin_Parser() { +BinLayoutParser:: +BinLayoutParser() { m_layout_size = 0; memset(m_layout_table, 0x00, sizeof(SclLayout) * MAX_SCL_LAYOUT); } -Layout_Bin_Parser:: -~Layout_Bin_Parser() { +BinLayoutParser:: +~BinLayoutParser() { } -Layout_Bin_Parser* Layout_Bin_Parser:: +BinLayoutParser* BinLayoutParser:: get_instance() { if (m_instance == NULL) { - m_instance = new Layout_Bin_Parser(); + m_instance = new BinLayoutParser(); } return m_instance; } -void Layout_Bin_Parser:: +void BinLayoutParser:: init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); @@ -51,7 +51,7 @@ init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* par } -int Layout_Bin_Parser:: +int BinLayoutParser:: get_layout_index(const char *name) { int ret = NOT_USED; if (name) { @@ -67,23 +67,23 @@ get_layout_index(const char *name) { return ret; } -PSclLayout Layout_Bin_Parser:: +PSclLayout BinLayoutParser:: get_layout_table() { return m_layout_table; } -int Layout_Bin_Parser:: +int BinLayoutParser:: get_layout_size() { return m_layout_size; } -PSclLayoutKeyCoordinatePointerTable Layout_Bin_Parser:: +PSclLayoutKeyCoordinatePointerTable BinLayoutParser:: get_key_coordinate_pointer_frame() { - Key_coordinate_frame_bin_Parser *key_coordinate_frame_bin_parser = Key_coordinate_frame_bin_Parser::get_instance(); + BinKeyCoordFrameParser *key_coordinate_frame_bin_parser = BinKeyCoordFrameParser::get_instance(); return key_coordinate_frame_bin_parser->get_key_coordinate_pointer_frame(); } -void Layout_Bin_Parser:: +void BinLayoutParser:: parsing_layout_table() { // 4 byte (range[0-4,294,967,295)) const int DATA_SIZE_BYTES = 4; @@ -116,7 +116,7 @@ parsing_layout_table() { } void -Layout_Bin_Parser:: +BinLayoutParser:: decode_color(SclColor& color, int width) { if (width <= 0) return; @@ -125,7 +125,7 @@ decode_color(SclColor& color, int width) { color.b = m_storage.get(width); color.a = m_storage.get(width); } -void Layout_Bin_Parser:: +void BinLayoutParser:: decode_layout_record(SclLayout& cur, const Layout_width& record_width) { //name m_storage.get_str(&(cur.name), record_width.name, m_string_collector); diff --git a/binary_xmlresource/magnifier_configure_bin_parser.cpp b/binary_xmlresource/magnifier_configure_bin_parser.cpp index ab1f01e..85ccd85 100644 --- a/binary_xmlresource/magnifier_configure_bin_parser.cpp +++ b/binary_xmlresource/magnifier_configure_bin_parser.cpp @@ -20,23 +20,23 @@ #include using namespace std; #include "put_record.h" -Magnifier_Configure_Bin_Parser* Magnifier_Configure_Bin_Parser::m_instance = NULL; +BinMagnifierConfigParser* BinMagnifierConfigParser::m_instance = NULL; -Magnifier_Configure_Bin_Parser::Magnifier_Configure_Bin_Parser() { +BinMagnifierConfigParser::BinMagnifierConfigParser() { memset((void*)&m_magnifier_configure, 0x00, sizeof(SclMagnifierWndConfigure)); } -Magnifier_Configure_Bin_Parser::~Magnifier_Configure_Bin_Parser() { +BinMagnifierConfigParser::~BinMagnifierConfigParser() { } -Magnifier_Configure_Bin_Parser* Magnifier_Configure_Bin_Parser::get_instance() { +BinMagnifierConfigParser* BinMagnifierConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Magnifier_Configure_Bin_Parser(); + m_instance = new BinMagnifierConfigParser(); } return m_instance; } -void Magnifier_Configure_Bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +void BinMagnifierConfigParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; @@ -44,7 +44,7 @@ void Magnifier_Configure_Bin_Parser::init(const FileStorage& storage, int offset } -void Magnifier_Configure_Bin_Parser::parsing_magnifier_configure() { +void BinMagnifierConfigParser::parsing_magnifier_configure() { Magnifier_configure_width record_width; set_magnifier_configure_width(*parser_info_provider, record_width); @@ -95,7 +95,7 @@ void Magnifier_Configure_Bin_Parser::parsing_magnifier_configure() { #endif } -PSclMagnifierWndConfigure Magnifier_Configure_Bin_Parser::get_magnifier_configure() { +PSclMagnifierWndConfigure BinMagnifierConfigParser::get_magnifier_configure() { return &m_magnifier_configure; } diff --git a/binary_xmlresource/modifier_decoration_bin_parser.cpp b/binary_xmlresource/modifier_decoration_bin_parser.cpp index 7b9f0f2..d589277 100644 --- a/binary_xmlresource/modifier_decoration_bin_parser.cpp +++ b/binary_xmlresource/modifier_decoration_bin_parser.cpp @@ -19,24 +19,24 @@ #include #include "put_record.h" -Modifier_decoration_bin_Parser* Modifier_decoration_bin_Parser::m_instance = NULL; +BinModifierDecorationParser* BinModifierDecorationParser::m_instance = NULL; -Modifier_decoration_bin_Parser::Modifier_decoration_bin_Parser() { +BinModifierDecorationParser::BinModifierDecorationParser() { memset(m_modifier_decoration_table, 0x00, sizeof(SclModifierDecoration) * MAX_SCL_MODIFIER_DECORATION_NUM); } -Modifier_decoration_bin_Parser::~Modifier_decoration_bin_Parser() { +BinModifierDecorationParser::~BinModifierDecorationParser() { } -Modifier_decoration_bin_Parser* -Modifier_decoration_bin_Parser::get_instance() { +BinModifierDecorationParser* +BinModifierDecorationParser::get_instance() { if (m_instance == NULL) { - m_instance = new Modifier_decoration_bin_Parser(); + m_instance = new BinModifierDecorationParser(); } return m_instance; } void -Modifier_decoration_bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +BinModifierDecorationParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; @@ -45,12 +45,12 @@ Modifier_decoration_bin_Parser::init(const FileStorage& storage, int offset, int } /* recompute_layout will change the table */ -PSclModifierDecoration Modifier_decoration_bin_Parser::get_modifier_decoration_table() { +PSclModifierDecoration BinModifierDecorationParser::get_modifier_decoration_table() { return m_modifier_decoration_table; } void -Modifier_decoration_bin_Parser::parsing_modifier_decoration_table() { +BinModifierDecorationParser::parsing_modifier_decoration_table() { PSclModifierDecoration cur = m_modifier_decoration_table; Modifier_decoration_width record_width; @@ -78,7 +78,7 @@ Modifier_decoration_bin_Parser::parsing_modifier_decoration_table() { } int -Modifier_decoration_bin_Parser::get_modifier_decoration_id( const char *name ) +BinModifierDecorationParser::get_modifier_decoration_id( const char *name ) { if (name == NULL) return -1; diff --git a/binary_xmlresource/nine_patch_file_list_bin_parser.cpp b/binary_xmlresource/nine_patch_file_list_bin_parser.cpp index 020f23b..3202629 100644 --- a/binary_xmlresource/nine_patch_file_list_bin_parser.cpp +++ b/binary_xmlresource/nine_patch_file_list_bin_parser.cpp @@ -19,23 +19,23 @@ #include #include #include "put_record.h" -Nine_patch_file_list_bin_Parser* Nine_patch_file_list_bin_Parser::m_instance = NULL; +BinNinePatchFileParser* BinNinePatchFileParser::m_instance = NULL; -Nine_patch_file_list_bin_Parser::Nine_patch_file_list_bin_Parser() { +BinNinePatchFileParser::BinNinePatchFileParser() { m_size = 0; memset(m_nine_patch_file_list, 0x00, sizeof(SclNinePatchInfo) * MAX_NINE_PATCH_FILE_LIST); } -Nine_patch_file_list_bin_Parser::~Nine_patch_file_list_bin_Parser() { +BinNinePatchFileParser::~BinNinePatchFileParser() { m_size = 0; } -Nine_patch_file_list_bin_Parser* Nine_patch_file_list_bin_Parser::get_instance() { +BinNinePatchFileParser* BinNinePatchFileParser::get_instance() { if (m_instance == NULL) { - m_instance = new Nine_patch_file_list_bin_Parser(); + m_instance = new BinNinePatchFileParser(); } return m_instance; } -void Nine_patch_file_list_bin_Parser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { +void BinNinePatchFileParser::init(const FileStorage& storage, int offset, int size, IParserInfo_Provider* parser_info_provider) { m_storage.set_str_provider(parser_info_provider); m_storage.get_storage(storage, offset, size); this->parser_info_provider = parser_info_provider; @@ -43,7 +43,7 @@ void Nine_patch_file_list_bin_Parser::init(const FileStorage& storage, int offse parsing_nine_patch_file_list(); } -void Nine_patch_file_list_bin_Parser::parsing_nine_patch_file_list() { +void BinNinePatchFileParser::parsing_nine_patch_file_list() { Nine_patch_width record_width; set_nine_patch_width(*parser_info_provider, record_width); @@ -70,11 +70,11 @@ void Nine_patch_file_list_bin_Parser::parsing_nine_patch_file_list() { } SclNinePatchInfo* -Nine_patch_file_list_bin_Parser::get_nine_patch_list() { +BinNinePatchFileParser::get_nine_patch_list() { return m_nine_patch_file_list; } bool -Nine_patch_file_list_bin_Parser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) { +BinNinePatchFileParser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) { if (filename == NULL) return false; for(int i = 0; i < MAX_NINE_PATCH_FILE_LIST && i < m_size; ++i) { diff --git a/sclres/sclres_manager.cpp b/sclres/sclres_manager.cpp index 7e563cb..45d7eff 100644 --- a/sclres/sclres_manager.cpp +++ b/sclres/sclres_manager.cpp @@ -15,6 +15,7 @@ * */ +#include "sclres.h" #include "sclres_manager.h" #include "xmlresource.h" #include "binary_xmlresource.h" @@ -25,11 +26,13 @@ using namespace binary_xmlresource; using namespace sclres; #include "put_record.h" +static sclres::SclRes *_current_parser = NULL; + SclResParserManager* SclResParserManager::m_instance = NULL; SclResParserManager::~SclResParserManager() { - if (m_cur) - delete m_cur; - m_cur = NULL; + if (_current_parser) + delete _current_parser; + _current_parser = NULL; } SclResParserManager* @@ -41,18 +44,18 @@ SclResParserManager::get_instance() { } SclResParserManager::SclResParserManager() { - m_cur = NULL; + _current_parser = NULL; } void SclResParserManager::init(const SCLParserType parser_type, const char *entry_filepath) { if (parser_type == SCL_PARSER_TYPE_XML) { SCLLOG(SclLog::MESSAGE, "Use text xml\n"); - m_cur = XMLResource::get_instance(); + _current_parser = XMLResource::get_instance(); } else if (parser_type == SCL_PARSER_TYPE_BINARY_XML) { SCLLOG(SclLog::MESSAGE, "Use binary xml\n"); - m_cur = BinXmlResource::get_instance(); + _current_parser = BinResource::get_instance(); } /* Let's acquire the directory information from filepath */ @@ -63,168 +66,168 @@ SclResParserManager::init(const SCLParserType parser_type, const char *entry_fil std::string filepath = str.substr(0, found); std::string filename = str.substr(found + 1); - //assert(m_cur != NULL); - if (m_cur != NULL) { + //assert(_current_parser != NULL); + if (_current_parser != NULL) { /* Assume the directory where the main entry file exists, is the default resource directory */ - m_cur->set_resource_directory(filepath.c_str()); - m_cur->init(filename.c_str()); + _current_parser->set_resource_directory(filepath.c_str()); + _current_parser->init(filename.c_str()); #ifdef __SCL_TXT_DEBUG - put_autopopup_configure(PARSER, *(m_cur->get_autopopup_configure())); - put_default_configure(PARSER, *(m_cur->get_default_configure())); - put_input_mode_configure_table(PARSER, m_cur->get_input_mode_configure_table()); - put_key_coordinate_frame(PARSER, m_cur->get_key_coordinate_pointer_frame()); - put_label_properties_frame(PARSER, m_cur->get_label_properties_frame()); - put_layout_table(PARSER, m_cur->get_layout_table()); - put_magnifier_wnd_configure(PARSER, *(m_cur->get_magnifier_configure())); - put_modifier_decoration(PARSER, m_cur->get_modifier_decoration_table()); - //put_nine_patch_info(PARSER, m_cur->get_nine_patch_file_list()); + put_autopopup_configure(PARSER, *(_current_parser->get_autopopup_configure())); + put_default_configure(PARSER, *(_current_parser->get_default_configure())); + put_input_mode_configure_table(PARSER, _current_parser->get_input_mode_configure_table()); + put_key_coordinate_frame(PARSER, _current_parser->get_key_coordinate_pointer_frame()); + put_label_properties_frame(PARSER, _current_parser->get_label_properties_frame()); + put_layout_table(PARSER, _current_parser->get_layout_table()); + put_magnifier_wnd_configure(PARSER, *(_current_parser->get_magnifier_configure())); + put_modifier_decoration(PARSER, _current_parser->get_modifier_decoration_table()); + //put_nine_patch_info(PARSER, _current_parser->get_nine_patch_file_list()); #endif } } void SclResParserManager::load(int layout_id) { - if (m_cur) { - m_cur->load(layout_id); + if (_current_parser) { + _current_parser->load(layout_id); } } void SclResParserManager::unload() { - if (m_cur) { - m_cur->unload(); + if (_current_parser) { + _current_parser->unload(); } } bool SclResParserManager::loaded(int layout_id) { - if (m_cur == NULL) return false; + if (_current_parser == NULL) return false; - return m_cur->loaded(layout_id); + return _current_parser->loaded(layout_id); } PSclInputModeConfigure SclResParserManager::get_input_mode_configure_table() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_input_mode_configure_table(); + return _current_parser->get_input_mode_configure_table(); } PSclLayout SclResParserManager::get_layout_table() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_layout_table(); + return _current_parser->get_layout_table(); } PSclLayoutKeyCoordinatePointerTable SclResParserManager::get_key_coordinate_pointer_frame() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_key_coordinate_pointer_frame(); + return _current_parser->get_key_coordinate_pointer_frame(); } PSclModifierDecoration SclResParserManager::get_modifier_decoration_table() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_modifier_decoration_table(); + return _current_parser->get_modifier_decoration_table(); } PSclLabelPropertiesTable SclResParserManager::get_label_properties_frame() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_label_properties_frame(); + return _current_parser->get_label_properties_frame(); } PSclDefaultConfigure SclResParserManager::get_default_configure() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_default_configure(); + return _current_parser->get_default_configure(); } PSclAutoPopupConfigure SclResParserManager::get_autopopup_configure() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_autopopup_configure(); + return _current_parser->get_autopopup_configure(); } PSclMagnifierWndConfigure SclResParserManager::get_magnifier_configure() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_magnifier_configure(); + return _current_parser->get_magnifier_configure(); } const char* SclResParserManager::get_resource_directory() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_resource_directory(); + return _current_parser->get_resource_directory(); } int SclResParserManager::get_inputmode_id(const char *name) { - if (m_cur == NULL) return -1; + if (_current_parser == NULL) return -1; - return m_cur->get_inputmode_id(name); + return _current_parser->get_inputmode_id(name); } const char* SclResParserManager::get_inputmode_name(int id) { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->get_inputmode_name(id); + return _current_parser->get_inputmode_name(id); } int SclResParserManager::get_inputmode_size() { - if (m_cur == NULL) return 0; + if (_current_parser == NULL) return 0; - return m_cur->get_inputmode_size(); + return _current_parser->get_inputmode_size(); } int SclResParserManager::get_layout_size() { - if (m_cur == NULL) return 0; + if (_current_parser == NULL) return 0; - return m_cur->get_layout_size(); + return _current_parser->get_layout_size(); } int SclResParserManager::get_layout_id(const char *name) { - if (m_cur == NULL) return -1; + if (_current_parser == NULL) return -1; - return m_cur->get_layout_id(name); + return _current_parser->get_layout_id(name); } int SclResParserManager::get_labelproperty_size() { - if (m_cur == NULL) return 0; + if (_current_parser == NULL) return 0; - return m_cur->get_labelproperty_size(); + return _current_parser->get_labelproperty_size(); } int SclResParserManager::get_modifier_decoration_id(const char *name) { - if (m_cur == NULL) return -1; + if (_current_parser == NULL) return -1; - return m_cur->get_modifier_decoration_id(name); + return _current_parser->get_modifier_decoration_id(name); } bool SclResParserManager::get_nine_patch_info(const char *filename, SclNinePatchInfo *info) { - if (m_cur == NULL) return false; + if (_current_parser == NULL) return false; - return m_cur->get_nine_patch_info(filename, info); + return _current_parser->get_nine_patch_info(filename, info); } const char* SclResParserManager::name() { - if (m_cur == NULL) return NULL; + if (_current_parser == NULL) return NULL; - return m_cur->name(); + return _current_parser->name(); } diff --git a/sclres/sclres_manager.h b/sclres/sclres_manager.h index a2469b5..987e96c 100644 --- a/sclres/sclres_manager.h +++ b/sclres/sclres_manager.h @@ -17,10 +17,7 @@ #ifndef __SCLRES_MANAGER__ #define __SCLRES_MANAGER__ -#include "sclres.h" -#include -#include -typedef std::vector SclResTable; +#include "sclres_type.h" class SclResParserManager{ public: @@ -59,17 +56,6 @@ class SclResParserManager{ private: SclResParserManager(); static SclResParserManager* m_instance; - sclres::SclRes* m_cur; - - private: - class DestructHelper { - public: - ~DestructHelper() { - if (SclResParserManager::m_instance != NULL) - delete m_instance; - } - }; - static DestructHelper des; }; #endif diff --git a/xmlresource/autopopup_configure_parser.cpp b/xmlresource/autopopup_configure_parser.cpp index 1c7e611..097aed9 100644 --- a/xmlresource/autopopup_configure_parser.cpp +++ b/xmlresource/autopopup_configure_parser.cpp @@ -69,7 +69,7 @@ class AutoPopupConfigureParserImpl { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::WARNING, "AutoPopup_Configure_Parser: empty document.\n"); + SCLLOG(SclLog::WARNING, "AutoPopupConfigParser: empty document.\n"); xmlFreeDoc(doc); return -1; } @@ -301,37 +301,37 @@ class AutoPopupConfigureParserImpl { SclAutoPopupConfigure m_autopopup_configure; }; -AutoPopup_Configure_Parser* AutoPopup_Configure_Parser::m_instance = NULL; +AutoPopupConfigParser* AutoPopupConfigParser::m_instance = NULL; -AutoPopup_Configure_Parser::AutoPopup_Configure_Parser() { +AutoPopupConfigParser::AutoPopupConfigParser() { m_impl = new AutoPopupConfigureParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create AutoPopup_Configure_Parser failed"); + SCLLOG(SclLog::ERROR, "Create AutoPopupConfigParser failed"); } } -AutoPopup_Configure_Parser::~AutoPopup_Configure_Parser() { +AutoPopupConfigParser::~AutoPopupConfigParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~AutoPopup_Configure_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~AutoPopupConfigParser() has called"); delete m_impl; m_impl = NULL; } } -AutoPopup_Configure_Parser* -AutoPopup_Configure_Parser::get_instance() { +AutoPopupConfigParser* +AutoPopupConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new AutoPopup_Configure_Parser(); + m_instance = new AutoPopupConfigParser(); } return m_instance; } int -AutoPopup_Configure_Parser::init(const char* file) { +AutoPopupConfigParser::init(const char* file) { return m_impl->parsing_autopopup_configure(file); } PSclAutoPopupConfigure -AutoPopup_Configure_Parser::get_autopopup_configure() { +AutoPopupConfigParser::get_autopopup_configure() { return &m_impl->m_autopopup_configure; } diff --git a/xmlresource/default_configure_parser.cpp b/xmlresource/default_configure_parser.cpp index 73f1746..51e8783 100644 --- a/xmlresource/default_configure_parser.cpp +++ b/xmlresource/default_configure_parser.cpp @@ -58,13 +58,13 @@ class DefaultConfigureParserImpl { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Default_Configure_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "DefaultConfigParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"default_configure")) { - SCLLOG(SclLog::DEBUG, "Default_Configure_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "DefaultConfigParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -202,36 +202,36 @@ class DefaultConfigureParserImpl { SclDefaultConfigure m_default_configure; }; -Default_Configure_Parser* Default_Configure_Parser::m_instance = NULL; +DefaultConfigParser* DefaultConfigParser::m_instance = NULL; -Default_Configure_Parser* -Default_Configure_Parser::get_instance() { +DefaultConfigParser* +DefaultConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Default_Configure_Parser(); + m_instance = new DefaultConfigParser(); } return m_instance; } -Default_Configure_Parser::Default_Configure_Parser() { +DefaultConfigParser::DefaultConfigParser() { m_impl = new DefaultConfigureParserImpl; if (m_impl == NULL) { SCLLOG(SclLog::ERROR, "Create DefaultConfigureParserImpl failed"); } } -Default_Configure_Parser::~Default_Configure_Parser() { +DefaultConfigParser::~DefaultConfigParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Default_Configure_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~DefaultConfigParser() has called"); delete m_impl; m_impl = NULL; } } int -Default_Configure_Parser::init(const char* file) { +DefaultConfigParser::init(const char* file) { return m_impl->parsing_default_configure(file); } PSclDefaultConfigure -Default_Configure_Parser::get_default_configure() { +DefaultConfigParser::get_default_configure() { return &m_impl->m_default_configure; } diff --git a/xmlresource/include/autopopup_configure_parser.h b/xmlresource/include/autopopup_configure_parser.h index b188d57..5be6bf8 100644 --- a/xmlresource/include/autopopup_configure_parser.h +++ b/xmlresource/include/autopopup_configure_parser.h @@ -15,25 +15,25 @@ * */ -#ifndef __AutoPopup_Configure_Parser__H__ -#define __AutoPopup_Configure_Parser__H__ +#ifndef __AutoPopupConfigParser__H__ +#define __AutoPopupConfigParser__H__ #include "sclres_type.h" typedef SclAutoPopupConfigure *PSclAutoPopupConfigure; class AutoPopupConfigureParserImpl; -class AutoPopup_Configure_Parser { +class AutoPopupConfigParser { AutoPopupConfigureParserImpl *m_impl; public: int init(const char* file); PSclAutoPopupConfigure get_autopopup_configure(); public: - ~AutoPopup_Configure_Parser(); - static AutoPopup_Configure_Parser *get_instance(); + ~AutoPopupConfigParser(); + static AutoPopupConfigParser *get_instance(); private: - AutoPopup_Configure_Parser(); - static AutoPopup_Configure_Parser *m_instance; + AutoPopupConfigParser(); + static AutoPopupConfigParser *m_instance; }; diff --git a/xmlresource/include/default_configure_parser.h b/xmlresource/include/default_configure_parser.h index 1061f2c..1dd6f71 100644 --- a/xmlresource/include/default_configure_parser.h +++ b/xmlresource/include/default_configure_parser.h @@ -23,17 +23,17 @@ typedef SclDefaultConfigure *PSclDefaultConfigure; class DefaultConfigureParserImpl; -class Default_Configure_Parser { +class DefaultConfigParser { DefaultConfigureParserImpl *m_impl; public: int init(const char* file); PSclDefaultConfigure get_default_configure(); public: - ~Default_Configure_Parser(); - static Default_Configure_Parser *get_instance(); + ~DefaultConfigParser(); + static DefaultConfigParser *get_instance(); private: - Default_Configure_Parser(); - static Default_Configure_Parser *m_instance; + DefaultConfigParser(); + static DefaultConfigParser *m_instance; }; diff --git a/xmlresource/include/label_properties_parser.h b/xmlresource/include/label_properties_parser.h index 85c2aa0..170b357 100644 --- a/xmlresource/include/label_properties_parser.h +++ b/xmlresource/include/label_properties_parser.h @@ -15,23 +15,23 @@ * */ -#ifndef __Label_properties_Parser__H__ -#define __Label_properties_Parser__H__ +#ifndef __LabelPropertyParser__H__ +#define __LabelPropertyParser__H__ #include "sclres_type.h" class LabelPropertiesParserImpl; -class Label_properties_Parser { +class LabelPropertyParser { LabelPropertiesParserImpl *m_impl; public: int init(const char* file); PSclLabelPropertiesTable get_label_properties_frame(); int get_size(); public: - ~Label_properties_Parser(); - static Label_properties_Parser *get_instance(); + ~LabelPropertyParser(); + static LabelPropertyParser *get_instance(); private: - Label_properties_Parser(); - static Label_properties_Parser *m_instance; + LabelPropertyParser(); + static LabelPropertyParser *m_instance; }; diff --git a/xmlresource/include/layout_parser.h b/xmlresource/include/layout_parser.h index ea0bf1a..8fa8c62 100644 --- a/xmlresource/include/layout_parser.h +++ b/xmlresource/include/layout_parser.h @@ -133,10 +133,10 @@ #define LAYOUT_ROW_KEY_AUTOPOPUP_KEYS_SHIFTMODE_ATTRIBUTE "shift_state" #define LAYOUT_ROW_KEY_MAGNIFIER_LABEL_TAG "magnifier_label" -class Layout_Parser { +class LayoutParser { public: - ~Layout_Parser(); - static Layout_Parser *get_instance(); + ~LayoutParser(); + static LayoutParser *get_instance(); int init(const char *dir, char **layout_files, int size); void load(int layout_id); @@ -169,7 +169,7 @@ class Layout_Parser { sclchar *label_type; sclchar *bg_image_path[SCL_SHIFT_STATE_MAX][SCL_BUTTON_STATE_MAX]; } Row; - Layout_Parser(); + LayoutParser(); int get_drag_state_prop(const xmlNodePtr cur_node); int get_shift_state_prop(const xmlNodePtr cur_node); @@ -210,7 +210,7 @@ class Layout_Parser { void release_key_strings(); private: - static Layout_Parser *m_instance; + static LayoutParser *m_instance; int m_layout_size; SclLayout m_layout_table[MAX_SCL_LAYOUT]; sclchar *m_layout_files[MAX_SCL_LAYOUT]; @@ -223,7 +223,7 @@ class Layout_Parser { class DestructHelper { public: ~DestructHelper() { - if (Layout_Parser::m_instance != NULL) + if (LayoutParser::m_instance != NULL) delete m_instance; } }; diff --git a/xmlresource/include/magnifier_configure_parser.h b/xmlresource/include/magnifier_configure_parser.h index b40ad83..c9a4b93 100644 --- a/xmlresource/include/magnifier_configure_parser.h +++ b/xmlresource/include/magnifier_configure_parser.h @@ -15,25 +15,25 @@ * */ -#ifndef __Magnifier_Configure_Parser__H__ -#define __Magnifier_Configure_Parser__H__ +#ifndef __MagnifierConfigParser__H__ +#define __MagnifierConfigParser__H__ #include "sclres_type.h" typedef SclMagnifierWndConfigure *PSclMagnifierWndConfigure; class MagnifierConfigureParserImpl; -class Magnifier_Configure_Parser { +class MagnifierConfigParser { MagnifierConfigureParserImpl *m_impl; public: int init(const char* file); PSclMagnifierWndConfigure get_magnifier_configure(); public: - ~Magnifier_Configure_Parser(); - static Magnifier_Configure_Parser *get_instance(); + ~MagnifierConfigParser(); + static MagnifierConfigParser *get_instance(); private: - Magnifier_Configure_Parser(); - static Magnifier_Configure_Parser *m_instance; + MagnifierConfigParser(); + static MagnifierConfigParser *m_instance; }; diff --git a/xmlresource/include/main_entry_parser.h b/xmlresource/include/main_entry_parser.h index dcf9240..a6313c7 100644 --- a/xmlresource/include/main_entry_parser.h +++ b/xmlresource/include/main_entry_parser.h @@ -15,8 +15,8 @@ * */ -#ifndef __Main_Entry_Parser__H__ -#define __Main_Entry_Parser__H__ +#ifndef __MainEntryParser__H__ +#define __MainEntryParser__H__ class XMLFiles{ public: char* input_mode_configure; @@ -60,7 +60,7 @@ class XMLFiles{ }; class MainEntryParserImpl; -class Main_Entry_Parser { +class MainEntryParser { MainEntryParserImpl *m_impl; public: /* parsing xml file, path is assigned */ @@ -68,11 +68,11 @@ class Main_Entry_Parser { XMLFiles& get_xml_files(); public: - ~Main_Entry_Parser(); - static Main_Entry_Parser *get_instance(); + ~MainEntryParser(); + static MainEntryParser *get_instance(); private: - Main_Entry_Parser(); - static Main_Entry_Parser *m_instance; + MainEntryParser(); + static MainEntryParser *m_instance; }; #endif diff --git a/xmlresource/include/modifier_decoration_parser.h b/xmlresource/include/modifier_decoration_parser.h index b357834..fe3802d 100644 --- a/xmlresource/include/modifier_decoration_parser.h +++ b/xmlresource/include/modifier_decoration_parser.h @@ -15,24 +15,24 @@ * */ -#ifndef __Modifier_decoration_Parser__H__ -#define __Modifier_decoration_Parser__H__ +#ifndef __ModifierDecorationParser__H__ +#define __ModifierDecorationParser__H__ #include "sclres_type.h" class ModifierDecorationParserImpl; -class Modifier_decoration_Parser { +class ModifierDecorationParser { ModifierDecorationParserImpl *m_impl; public: int init(const char* file); PSclModifierDecoration get_modifier_decoration_table(); int get_modifier_decoration_id(const char *name); public: - ~Modifier_decoration_Parser(); - static Modifier_decoration_Parser *get_instance(); + ~ModifierDecorationParser(); + static ModifierDecorationParser *get_instance(); private: - Modifier_decoration_Parser(); - static Modifier_decoration_Parser *m_instance; + ModifierDecorationParser(); + static ModifierDecorationParser *m_instance; }; diff --git a/xmlresource/include/nine_patch_file_list_parser.h b/xmlresource/include/nine_patch_file_list_parser.h index eec02bc..f37deb4 100644 --- a/xmlresource/include/nine_patch_file_list_parser.h +++ b/xmlresource/include/nine_patch_file_list_parser.h @@ -15,25 +15,25 @@ * */ -#ifndef __Nine_patch_file_list_Parser__H__ -#define __Nine_patch_file_list_Parser__H__ +#ifndef __NinePatchFileParser_Parser__H__ +#define __NinePatchFileParser_Parser__H__ #include "sclres_type.h" const int MAX_NINE_PATCH_FILE_LIST = 128; class NinePatchFileListParserImpl; -class Nine_patch_file_list_Parser { +class NinePatchFileParser_Parser { 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: - ~Nine_patch_file_list_Parser(); - static Nine_patch_file_list_Parser *get_instance(); + ~NinePatchFileParser_Parser(); + static NinePatchFileParser_Parser *get_instance(); private: - Nine_patch_file_list_Parser(); - static Nine_patch_file_list_Parser *m_instance; + NinePatchFileParser_Parser(); + static NinePatchFileParser_Parser *m_instance; }; diff --git a/xmlresource/include/xmlresource.h b/xmlresource/include/xmlresource.h index f761465..4ab1b6a 100644 --- a/xmlresource/include/xmlresource.h +++ b/xmlresource/include/xmlresource.h @@ -72,15 +72,15 @@ class XMLResource: public sclres::SclRes{ private: static XMLResource* m_instance; - Main_Entry_Parser *m_main_entry_parser; + MainEntryParser *m_main_entry_parser; Input_Mode_Configure_Parser *m_input_mode_configure_parser; - Layout_Parser *m_layout_parser; - Modifier_decoration_Parser *m_modifier_decoration_parser; - Label_properties_Parser *m_label_properties_parser; - Default_Configure_Parser *m_default_configure_parser; - AutoPopup_Configure_Parser *m_autopopup_configure_parser; - Magnifier_Configure_Parser *m_magnifier_configure_parser; - Nine_patch_file_list_Parser *m_nine_patch_file_list_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; private: class DestructHelper { diff --git a/xmlresource/label_properties_parser.cpp b/xmlresource/label_properties_parser.cpp index d5bd308..f1a4c24 100644 --- a/xmlresource/label_properties_parser.cpp +++ b/xmlresource/label_properties_parser.cpp @@ -380,43 +380,43 @@ class LabelPropertiesParserImpl { int m_size; }; -Label_properties_Parser* Label_properties_Parser::m_instance = NULL; +LabelPropertyParser* LabelPropertyParser::m_instance = NULL; -Label_properties_Parser::Label_properties_Parser() { +LabelPropertyParser::LabelPropertyParser() { m_impl = new LabelPropertiesParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create Label_properties_Parser failed"); + SCLLOG(SclLog::ERROR, "Create LabelPropertyParser failed"); } } -Label_properties_Parser::~Label_properties_Parser() { +LabelPropertyParser::~LabelPropertyParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Label_properties_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~LabelPropertyParser() has called"); delete m_impl; m_impl = NULL; } } -Label_properties_Parser* -Label_properties_Parser::get_instance() { +LabelPropertyParser* +LabelPropertyParser::get_instance() { if (m_instance == NULL) { - m_instance = new Label_properties_Parser(); + m_instance = new LabelPropertyParser(); } return m_instance; } int -Label_properties_Parser::init(const char* file) { +LabelPropertyParser::init(const char* file) { return m_impl->parsing_label_properties_frame(file); } int -Label_properties_Parser::get_size() { +LabelPropertyParser::get_size() { return m_impl->m_size; } //recompute_layout will change the table PSclLabelPropertiesTable -Label_properties_Parser::get_label_properties_frame() { +LabelPropertyParser::get_label_properties_frame() { return m_impl->m_label_properties_frame; } diff --git a/xmlresource/layout_parser.cpp b/xmlresource/layout_parser.cpp index 289a8f1..0aa0c85 100644 --- a/xmlresource/layout_parser.cpp +++ b/xmlresource/layout_parser.cpp @@ -28,16 +28,16 @@ using namespace std; -Layout_Parser* Layout_Parser::m_instance = NULL; +LayoutParser* LayoutParser::m_instance = NULL; -Layout_Parser::Layout_Parser() { +LayoutParser::LayoutParser() { m_layout_size = 0; memset(m_layout_files, 0x00, sizeof(char*) * MAX_SCL_LAYOUT); memset(m_layout_table, 0x00, sizeof(SclLayout) * MAX_SCL_LAYOUT); memset(m_key_coordinate_pointer_frame, 0x00, sizeof(SclLayoutKeyCoordinatePointer) * MAX_SCL_LAYOUT * MAX_KEY); } -Layout_Parser::~Layout_Parser() { +LayoutParser::~LayoutParser() { for (int i = 0; i < MAX_SCL_LAYOUT; ++i) { for (int j = 0; j < MAX_KEY; ++j) { free(m_key_coordinate_pointer_frame[i][j]); @@ -54,16 +54,16 @@ Layout_Parser::~Layout_Parser() { release_key_strings(); } -Layout_Parser* -Layout_Parser::get_instance() { +LayoutParser* +LayoutParser::get_instance() { if (m_instance == NULL) { - m_instance = new Layout_Parser(); + m_instance = new LayoutParser(); } return m_instance; } int -Layout_Parser::init(const char* dir, char **layout_files, int size) { +LayoutParser::init(const char* dir, char **layout_files, int size) { int ret = -1; if (dir && layout_files) { m_dir = string(dir); @@ -74,7 +74,7 @@ Layout_Parser::init(const char* dir, char **layout_files, int size) { } void -Layout_Parser::load(int layout_id) { +LayoutParser::load(int layout_id) { if (layout_id >= 0 && layout_id < MAX_SCL_LAYOUT) { xmlDocPtr doc; xmlNodePtr cur_node; @@ -90,13 +90,13 @@ Layout_Parser::load(int layout_id) { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::ERROR, "Layout_Parser: empty document.\n"); + SCLLOG(SclLog::ERROR, "LayoutParser: empty document.\n"); xmlFreeDoc(doc); exit(1); } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)LAYOUT_TAG)) { - SCLLOG(SclLog::ERROR, "Layout_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::ERROR, "LayoutParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); exit(1); } @@ -108,7 +108,7 @@ Layout_Parser::load(int layout_id) { } } -void Layout_Parser::unload() { +void LayoutParser::unload() { for (int i = 0; i < MAX_SCL_LAYOUT; ++i) { for (int j = 0; j < MAX_KEY; ++j) { free(m_key_coordinate_pointer_frame[i][j]); @@ -120,7 +120,7 @@ void Layout_Parser::unload() { } bool -Layout_Parser::loaded(int layout_id) { +LayoutParser::loaded(int layout_id) { bool ret = TRUE; if (layout_id >= 0 && layout_id < MAX_SCL_LAYOUT) { @@ -133,14 +133,14 @@ Layout_Parser::loaded(int layout_id) { } void -Layout_Parser::add_layout_string(xmlChar* newstr) { +LayoutParser::add_layout_string(xmlChar* newstr) { if (newstr) { m_vec_layout_strings.push_back(newstr); } } void -Layout_Parser::release_layout_strings() { +LayoutParser::release_layout_strings() { for(int loop = 0;loop < m_vec_layout_strings.size();loop++) { if (m_vec_layout_strings[loop]) { xmlFree(m_vec_layout_strings[loop]); @@ -150,14 +150,14 @@ Layout_Parser::release_layout_strings() { } void -Layout_Parser::add_key_string(xmlChar* newstr) { +LayoutParser::add_key_string(xmlChar* newstr) { if (newstr) { m_vec_key_strings.push_back(newstr); } } void -Layout_Parser::release_key_strings() { +LayoutParser::release_key_strings() { for(int loop = 0;loop < m_vec_key_strings.size();loop++) { if (m_vec_key_strings[loop]) { xmlFree(m_vec_key_strings[loop]); @@ -167,7 +167,7 @@ Layout_Parser::release_key_strings() { } int -Layout_Parser::get_layout_index(const char *name) { +LayoutParser::get_layout_index(const char *name) { int ret = NOT_USED; if (name) { for(int loop = 0;loop < MAX_SCL_LAYOUT && ret == NOT_USED;loop++) { @@ -183,22 +183,22 @@ Layout_Parser::get_layout_index(const char *name) { } PSclLayout -Layout_Parser::get_layout_table() { +LayoutParser::get_layout_table() { return m_layout_table; } int -Layout_Parser::get_layout_size() { +LayoutParser::get_layout_size() { return m_layout_size; } PSclLayoutKeyCoordinatePointerTable -Layout_Parser::get_key_coordinate_pointer_frame() { +LayoutParser::get_key_coordinate_pointer_frame() { return m_key_coordinate_pointer_frame; } int -Layout_Parser::parsing_layout_table(const char* dir, char** file, int file_num) { +LayoutParser::parsing_layout_table(const char* dir, char** file, int file_num) { m_layout_size = file_num; for (int index = 0; index < file_num; ++index) { m_layout_files[index] = strdup(file[index]); @@ -216,13 +216,13 @@ Layout_Parser::parsing_layout_table(const char* dir, char** file, int file_num) cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Layout_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "LayoutParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)LAYOUT_TAG)) { - SCLLOG(SclLog::DEBUG, "Layout_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "LayoutParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -237,7 +237,7 @@ Layout_Parser::parsing_layout_table(const char* dir, char** file, int file_num) } void -Layout_Parser::parsing_background( +LayoutParser::parsing_background( const xmlNodePtr cur_node, PSclLayout cur_layout) { assert(cur_node != NULL); @@ -266,7 +266,7 @@ Layout_Parser::parsing_background( } void -Layout_Parser::parsing_key_background( +LayoutParser::parsing_key_background( const xmlNodePtr cur_node, PSclLayout cur_layout) { assert(cur_node != NULL); @@ -295,8 +295,8 @@ Layout_Parser::parsing_key_background( void -Layout_Parser::set_default_layout_value(const PSclLayout cur_layout) { - Default_Configure_Parser *default_configure_parser = Default_Configure_Parser::get_instance(); +LayoutParser::set_default_layout_value(const PSclLayout cur_layout) { + DefaultConfigParser *default_configure_parser = DefaultConfigParser::get_instance(); assert(default_configure_parser); const PSclDefaultConfigure sclres_default_configure = default_configure_parser->get_default_configure(); @@ -341,7 +341,7 @@ Layout_Parser::set_default_layout_value(const PSclLayout cur_layout) { } void -Layout_Parser::set_default_row_value( +LayoutParser::set_default_row_value( Row* row, const PSclLayout cur_rec_layout, int row_y) { @@ -369,7 +369,7 @@ Layout_Parser::set_default_row_value( } void -Layout_Parser::set_default_key_coordinate_value( +LayoutParser::set_default_key_coordinate_value( const PSclLayoutKeyCoordinate cur_rec_coordinate, const Row* row) { assert(row != NULL); @@ -456,7 +456,7 @@ Layout_Parser::set_default_key_coordinate_value( } void -Layout_Parser::parsing_grab_area( +LayoutParser::parsing_grab_area( const xmlNodePtr cur_node, const PSclLayout cur_rec_layout) { assert(cur_node != NULL); @@ -480,7 +480,7 @@ Layout_Parser::parsing_grab_area( } void -Layout_Parser::parsing_layout_node( +LayoutParser::parsing_layout_node( const xmlNodePtr cur_node, const PSclLayout cur_rec_layout, int layout_no) { @@ -566,7 +566,7 @@ Layout_Parser::parsing_layout_node( } void -Layout_Parser::loading_coordinate_resources( +LayoutParser::loading_coordinate_resources( const xmlNodePtr cur_node, const PSclLayout cur_rec_layout, int layout_no) { @@ -590,7 +590,7 @@ Layout_Parser::loading_coordinate_resources( } void -Layout_Parser::parsing_layout_row_node( +LayoutParser::parsing_layout_row_node( const xmlNodePtr cur_node, const PSclLayout cur_rec_layout, int *row_y, @@ -631,7 +631,7 @@ Layout_Parser::parsing_layout_row_node( } int -Layout_Parser::get_drag_state_prop(const xmlNodePtr cur_node) { +LayoutParser::get_drag_state_prop(const xmlNodePtr cur_node) { assert(cur_node != NULL); typedef struct _Match_Struct{ int value; @@ -665,7 +665,7 @@ Layout_Parser::get_drag_state_prop(const xmlNodePtr cur_node) { } int -Layout_Parser::get_shift_state_prop(const xmlNodePtr cur_node) { +LayoutParser::get_shift_state_prop(const xmlNodePtr cur_node) { assert(cur_node != NULL); int shift_state = -1; @@ -681,7 +681,7 @@ Layout_Parser::get_shift_state_prop(const xmlNodePtr cur_node) { return shift_state; } int -Layout_Parser::get_button_state_prop(const xmlNodePtr cur_node) { +LayoutParser::get_button_state_prop(const xmlNodePtr cur_node) { assert(cur_node != NULL); int button_state = -1; @@ -697,7 +697,7 @@ Layout_Parser::get_button_state_prop(const xmlNodePtr cur_node) { } int -Layout_Parser::get_multitouch_type_prop(const xmlNodePtr cur_node) { +LayoutParser::get_multitouch_type_prop(const xmlNodePtr cur_node) { assert(cur_node != NULL); typedef struct _Match_Struct{ int value; @@ -728,7 +728,7 @@ Layout_Parser::get_multitouch_type_prop(const xmlNodePtr cur_node) { } int -Layout_Parser::get_extra_option_prop( +LayoutParser::get_extra_option_prop( const xmlNodePtr cur_node) { assert(cur_node != NULL); typedef struct _Match_Struct{ @@ -764,7 +764,7 @@ Layout_Parser::get_extra_option_prop( void -Layout_Parser::parsing_label_record_node( +LayoutParser::parsing_label_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -812,7 +812,7 @@ Layout_Parser::parsing_label_record_node( } void -Layout_Parser::parsing_magnifier_label_record_node( +LayoutParser::parsing_magnifier_label_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -842,7 +842,7 @@ Layout_Parser::parsing_magnifier_label_record_node( } void -Layout_Parser::parsing_label_image_record_node( +LayoutParser::parsing_label_image_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -870,7 +870,7 @@ Layout_Parser::parsing_label_image_record_node( } void -Layout_Parser::parsing_background_image_record_node( +LayoutParser::parsing_background_image_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -898,7 +898,7 @@ Layout_Parser::parsing_background_image_record_node( } void -Layout_Parser::parsing_key_value_record_node( +LayoutParser::parsing_key_value_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -936,7 +936,7 @@ Layout_Parser::parsing_key_value_record_node( } void -Layout_Parser::parsing_key_event_record_node( +LayoutParser::parsing_key_event_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -963,7 +963,7 @@ Layout_Parser::parsing_key_event_record_node( } void -Layout_Parser::parsing_auto_popup_keys_record_node( +LayoutParser::parsing_auto_popup_keys_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); @@ -1009,7 +1009,7 @@ Layout_Parser::parsing_auto_popup_keys_record_node( } void -Layout_Parser::parsing_key_coordinate_record_node( +LayoutParser::parsing_key_coordinate_record_node( const xmlNodePtr cur_node, Row *row, SclLayoutKeyCoordinatePointer *cur_rec_coordinate) { assert(cur_node != NULL); @@ -1017,7 +1017,7 @@ Layout_Parser::parsing_key_coordinate_record_node( *cur_rec_coordinate = (SclLayoutKeyCoordinatePointer)malloc(sizeof(SclLayoutKeyCoordinate)); if (*cur_rec_coordinate == NULL) { - SCLLOG(SclLog::ERROR, "Layout_Parser: memory malloc eror.\n"); + SCLLOG(SclLog::ERROR, "LayoutParser: memory malloc eror.\n"); return; } memset(*cur_rec_coordinate, 0x00, sizeof(SclLayoutKeyCoordinate)); @@ -1183,7 +1183,7 @@ Layout_Parser::parsing_key_coordinate_record_node( } void -Layout_Parser::parsing_popup_input_mode_record_node( +LayoutParser::parsing_popup_input_mode_record_node( const xmlNodePtr cur_node, const PSclLayoutKeyCoordinate cur_rec) { assert(cur_node != NULL); diff --git a/xmlresource/magnifier_configure_parser.cpp b/xmlresource/magnifier_configure_parser.cpp index 6b27a98..73193ff 100644 --- a/xmlresource/magnifier_configure_parser.cpp +++ b/xmlresource/magnifier_configure_parser.cpp @@ -83,13 +83,13 @@ class MagnifierConfigureParserImpl { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Magnifier_Configure_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "MagnifierConfigParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"magnifier_configure")) { - SCLLOG(SclLog::DEBUG, "Magnifier_Configure_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "MagnifierConfigParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -199,37 +199,37 @@ class MagnifierConfigureParserImpl { SclMagnifierWndConfigure m_magnifier_configure; }; -Magnifier_Configure_Parser* Magnifier_Configure_Parser::m_instance = NULL; +MagnifierConfigParser* MagnifierConfigParser::m_instance = NULL; -Magnifier_Configure_Parser::Magnifier_Configure_Parser() { +MagnifierConfigParser::MagnifierConfigParser() { m_impl = new MagnifierConfigureParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create Magnifier_Configure_Parser failed"); + SCLLOG(SclLog::ERROR, "Create MagnifierConfigParser failed"); } } -Magnifier_Configure_Parser::~Magnifier_Configure_Parser() { +MagnifierConfigParser::~MagnifierConfigParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Magnifier_Configure_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~MagnifierConfigParser() has called"); delete m_impl; m_impl = NULL; } } -Magnifier_Configure_Parser* -Magnifier_Configure_Parser::get_instance() { +MagnifierConfigParser* +MagnifierConfigParser::get_instance() { if (m_instance == NULL) { - m_instance = new Magnifier_Configure_Parser(); + m_instance = new MagnifierConfigParser(); } return m_instance; } int -Magnifier_Configure_Parser::init(const char* file) { +MagnifierConfigParser::init(const char* file) { return m_impl->parsing_magnifier_configure(file); } PSclMagnifierWndConfigure -Magnifier_Configure_Parser::get_magnifier_configure() { +MagnifierConfigParser::get_magnifier_configure() { return &m_impl->m_magnifier_configure; } diff --git a/xmlresource/main_entry_parser.cpp b/xmlresource/main_entry_parser.cpp index 5c1d00c..c02ceff 100644 --- a/xmlresource/main_entry_parser.cpp +++ b/xmlresource/main_entry_parser.cpp @@ -39,13 +39,13 @@ class MainEntryParserImpl { cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Main_Entry_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "MainEntryParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"main-entry")) { - SCLLOG(SclLog::DEBUG, "Main_Entry_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "MainEntryParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -105,9 +105,9 @@ class MainEntryParserImpl { XMLFiles m_xml_files; }; -Main_Entry_Parser* Main_Entry_Parser::m_instance = NULL; +MainEntryParser* MainEntryParser::m_instance = NULL; -Main_Entry_Parser::Main_Entry_Parser() { +MainEntryParser::MainEntryParser() { m_impl = new MainEntryParserImpl; if (m_impl == NULL) { SCLLOG(SclLog::ERROR, "Create MainEntryParserImpl failed"); @@ -115,29 +115,29 @@ Main_Entry_Parser::Main_Entry_Parser() { } } -Main_Entry_Parser::~Main_Entry_Parser() { +MainEntryParser::~MainEntryParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Main_Entry_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~MainEntryParser() has called"); delete m_impl; m_impl = NULL; } } -Main_Entry_Parser* -Main_Entry_Parser::get_instance() { +MainEntryParser* +MainEntryParser::get_instance() { if (m_instance == NULL) { - m_instance = new Main_Entry_Parser(); + m_instance = new MainEntryParser(); } return m_instance; } int -Main_Entry_Parser::init(const char* path) { +MainEntryParser::init(const char* path) { return m_impl->parsing_main_entry(path); } XMLFiles& -Main_Entry_Parser::get_xml_files() { +MainEntryParser::get_xml_files() { return m_impl->m_xml_files; } diff --git a/xmlresource/modifier_decoration_parser.cpp b/xmlresource/modifier_decoration_parser.cpp index e775997..28a7db8 100644 --- a/xmlresource/modifier_decoration_parser.cpp +++ b/xmlresource/modifier_decoration_parser.cpp @@ -121,13 +121,13 @@ class ModifierDecorationParserImpl { } cur_node = xmlDocGetRootElement(doc); if (cur_node == NULL) { - SCLLOG(SclLog::DEBUG, "Modifier_decoration_Parser: empty document.\n"); + SCLLOG(SclLog::DEBUG, "ModifierDecorationParser: empty document.\n"); xmlFreeDoc(doc); return -1; } if (0 != xmlStrcmp(cur_node->name, (const xmlChar*)"modifier_decoration_table")) { - SCLLOG(SclLog::DEBUG, "Modifier_decoration_Parser: root name error: %s\n!", (char *)cur_node->name); + SCLLOG(SclLog::DEBUG, "ModifierDecorationParser: root name error: %s\n!", (char *)cur_node->name); xmlFreeDoc(doc); return -1; } @@ -233,44 +233,44 @@ class ModifierDecorationParserImpl { SclModifierDecoration m_modifier_decoration_table[MAX_SCL_MODIFIER_DECORATION_NUM]; }; -Modifier_decoration_Parser* Modifier_decoration_Parser::m_instance = NULL; +ModifierDecorationParser* ModifierDecorationParser::m_instance = NULL; -Modifier_decoration_Parser* -Modifier_decoration_Parser::get_instance() { +ModifierDecorationParser* +ModifierDecorationParser::get_instance() { if (m_instance == NULL) { - m_instance = new Modifier_decoration_Parser(); + m_instance = new ModifierDecorationParser(); } return m_instance; } -Modifier_decoration_Parser::Modifier_decoration_Parser() { +ModifierDecorationParser::ModifierDecorationParser() { m_impl = new ModifierDecorationParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create Modifier_decoration_Parser failed"); + SCLLOG(SclLog::ERROR, "Create ModifierDecorationParser failed"); } } -Modifier_decoration_Parser::~Modifier_decoration_Parser() { +ModifierDecorationParser::~ModifierDecorationParser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Modifier_decoration_Parser() has called"); + SCLLOG(SclLog::MESSAGE, "~ModifierDecorationParser() has called"); delete m_impl; m_impl = NULL; } } int -Modifier_decoration_Parser::init(const char* file) { +ModifierDecorationParser::init(const char* file) { return m_impl->parsing_modifier_decoration_table(file); } /* recompute_layout will change the table */ PSclModifierDecoration -Modifier_decoration_Parser::get_modifier_decoration_table() { +ModifierDecorationParser::get_modifier_decoration_table() { return m_impl->m_modifier_decoration_table; } int -Modifier_decoration_Parser::get_modifier_decoration_id( const char *name ) +ModifierDecorationParser::get_modifier_decoration_id( const char *name ) { if (name == NULL) { SCLLOG(SclLog::DEBUG, "get_modifier_decoration_id() has failed"); diff --git a/xmlresource/nine_patch_file_list_parser.cpp b/xmlresource/nine_patch_file_list_parser.cpp index 63d4cf9..15ebea9 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, "Nine_patch_file_list_Parser: image_path should be not NULL"); + SCLLOG(SclLog::ERROR, "NinePatchFileParser_Parser: image_path should be not NULL"); } m_size++; if (m_size >= MAX_NINE_PATCH_FILE_LIST) { @@ -92,37 +92,37 @@ class NinePatchFileListParserImpl { }; -Nine_patch_file_list_Parser* Nine_patch_file_list_Parser::m_instance = NULL; +NinePatchFileParser_Parser* NinePatchFileParser_Parser::m_instance = NULL; -Nine_patch_file_list_Parser::Nine_patch_file_list_Parser() { +NinePatchFileParser_Parser::NinePatchFileParser_Parser() { m_impl = new NinePatchFileListParserImpl; if (m_impl == NULL) { - SCLLOG(SclLog::ERROR, "Create Nine_patch_file_list_Parser failed"); + SCLLOG(SclLog::ERROR, "Create NinePatchFileParser_Parser failed"); } } -Nine_patch_file_list_Parser::~Nine_patch_file_list_Parser() { +NinePatchFileParser_Parser::~NinePatchFileParser_Parser() { if (m_impl) { - SCLLOG(SclLog::MESSAGE, "~Nine_patch_file_list_Parser() has called."); + SCLLOG(SclLog::MESSAGE, "~NinePatchFileParser_Parser() has called."); delete m_impl; m_impl = NULL; } } -Nine_patch_file_list_Parser* -Nine_patch_file_list_Parser::get_instance() { +NinePatchFileParser_Parser* +NinePatchFileParser_Parser::get_instance() { if (m_instance == NULL) { - m_instance = new Nine_patch_file_list_Parser(); + m_instance = new NinePatchFileParser_Parser(); } return m_instance; } int -Nine_patch_file_list_Parser::init(const char* file) { +NinePatchFileParser_Parser::init(const char* file) { return m_impl->parsing_nine_patch_file_list(file); } bool -Nine_patch_file_list_Parser::get_nine_patch_info(const char* filename, SclNinePatchInfo *info) { +NinePatchFileParser_Parser::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 +150,6 @@ Nine_patch_file_list_Parser::get_nine_patch_info(const char* filename, SclNinePa } SclNinePatchInfo* -Nine_patch_file_list_Parser::get_nine_patch_list() { +NinePatchFileParser_Parser::get_nine_patch_list() { return m_impl->m_nine_patch_file_list; } diff --git a/xmlresource/xmlresource.cpp b/xmlresource/xmlresource.cpp index 7809afc..504fe1d 100644 --- a/xmlresource/xmlresource.cpp +++ b/xmlresource/xmlresource.cpp @@ -134,7 +134,7 @@ get_layout_files(char **layout_files, int* size) { void XMLResource::init(const char *entry_filepath) { if (m_main_entry_parser == NULL) { - m_main_entry_parser = Main_Entry_Parser::get_instance(); + m_main_entry_parser = MainEntryParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), entry_filepath); if ( 0 != m_main_entry_parser->init(input_file)) { @@ -159,7 +159,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init default_configure\n\n"); if (m_default_configure_parser == NULL) { - m_default_configure_parser = Default_Configure_Parser::get_instance(); + m_default_configure_parser = DefaultConfigParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.default_configure); @@ -171,7 +171,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init modifier_decoration\n\n"); if (m_modifier_decoration_parser == NULL) { - m_modifier_decoration_parser = Modifier_decoration_Parser::get_instance(); + m_modifier_decoration_parser = ModifierDecorationParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.modifier_decoration); @@ -182,7 +182,7 @@ XMLResource::init(const char *entry_filepath) { } SCLLOG(SclLog::MESSAGE, "init label_properties\n\n"); if (m_label_properties_parser == NULL) { - m_label_properties_parser = Label_properties_Parser::get_instance(); + m_label_properties_parser = LabelPropertyParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.key_label_property); @@ -194,7 +194,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init autopopup_configure\n\n"); if (m_autopopup_configure_parser == NULL) { - m_autopopup_configure_parser = AutoPopup_Configure_Parser::get_instance(); + m_autopopup_configure_parser = AutoPopupConfigParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.autopopup_configure); if (0 != m_autopopup_configure_parser->init(input_file)) { @@ -204,7 +204,7 @@ XMLResource::init(const char *entry_filepath) { } SCLLOG(SclLog::MESSAGE, "init magnifier_configure\n\n"); if (m_magnifier_configure_parser == NULL) { - m_magnifier_configure_parser = Magnifier_Configure_Parser::get_instance(); + m_magnifier_configure_parser = MagnifierConfigParser::get_instance(); char input_file[_POSIX_PATH_MAX] = {0}; snprintf(input_file, _POSIX_PATH_MAX, "%s/%s", get_resource_directory(), xml_files.magnifier_configure); @@ -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 = Nine_patch_file_list_Parser::get_instance(); + m_nine_patch_file_list_parser = NinePatchFileParser_Parser::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); @@ -228,7 +228,7 @@ XMLResource::init(const char *entry_filepath) { SCLLOG(SclLog::MESSAGE, "init layout\n\n"); if (m_layout_parser == NULL) { - m_layout_parser = Layout_Parser::get_instance(); + m_layout_parser = LayoutParser::get_instance(); char **layout_files = NULL; int layout_file_size = 0;