diff --git a/inc/hgl/util/xml/ElementParse.h b/inc/hgl/util/xml/ElementParse.h index 05e6ed0..e39dc36 100644 --- a/inc/hgl/util/xml/ElementParse.h +++ b/inc/hgl/util/xml/ElementParse.h @@ -1,4 +1,4 @@ -#ifndef HGL_UTIL_XML_ELEMENT_PARSE_INCLUDE +#ifndef HGL_UTIL_XML_ELEMENT_PARSE_INCLUDE #define HGL_UTIL_XML_ELEMENT_PARSE_INCLUDE #include diff --git a/inc/hgl/util/xml/ElementParseCreater.h b/inc/hgl/util/xml/ElementParseCreater.h index 84c7250..6afdbdd 100644 --- a/inc/hgl/util/xml/ElementParseCreater.h +++ b/inc/hgl/util/xml/ElementParseCreater.h @@ -1,4 +1,4 @@ -#ifndef HGL_UTIL_XML_ELEMENT_PARSE_CREATER_INCLUDE +#ifndef HGL_UTIL_XML_ELEMENT_PARSE_CREATER_INCLUDE #define HGL_UTIL_XML_ELEMENT_PARSE_CREATER_INCLUDE #include @@ -16,7 +16,7 @@ namespace hgl UTF8String element_name; protected: - + Map ecs_map; virtual ElementCreater *GetSubElementCreater(const UTF8String &sub_name); @@ -65,7 +65,7 @@ namespace hgl } public: - + virtual bool Init () override { attrs_list.ClearData(); @@ -84,7 +84,7 @@ namespace hgl class ElementParseCreater:public ElementParse { Stack ecs_stack; - + Map ecs_map; ElementCreater *cur_ec; @@ -103,7 +103,7 @@ namespace hgl bool Registry (ElementCreater *ec); public: - + virtual bool Init (const u8char *element_name) override; virtual void Attr (const u8char *flag,const u8char *info) override; virtual bool Start () override; diff --git a/inc/hgl/util/xml/ElementParseKV.h b/inc/hgl/util/xml/ElementParseKV.h index c7fb4b1..a0aed36 100644 --- a/inc/hgl/util/xml/ElementParseKV.h +++ b/inc/hgl/util/xml/ElementParseKV.h @@ -1,4 +1,4 @@ -#ifndef HGL_UTIL_XML_ELEMENT_PARSE_KV_INCLUDE +#ifndef HGL_UTIL_XML_ELEMENT_PARSE_KV_INCLUDE #define HGL_UTIL_XML_ELEMENT_PARSE_KV_INCLUDE #include @@ -26,7 +26,7 @@ namespace hgl template const bool GetInteger (const UTF8String &name,T &value){const AttrItem *ai=GetAttrItem(name);return(ai?stoi(ai->right.c_str(),value):false);} template const bool GetUInteger (const UTF8String &name,T &value){const AttrItem *ai=GetAttrItem(name);return(ai?stou(ai->right.c_str(),value):false);} - template const bool GetFloat (const UTF8String &name,T &value){const AttrItem *ai=GetAttrItem(name);return(ai?stof(ai->right.c_str(),value):false);} + template const bool GetFloat (const UTF8String &name,T &value){const AttrItem *ai=GetAttrItem(name);return(ai?stof(ai->right.c_str(),value):false);} public: diff --git a/src/xml/ElementCreater.cpp b/src/xml/ElementCreater.cpp index 4ad6f12..589f11d 100644 --- a/src/xml/ElementCreater.cpp +++ b/src/xml/ElementCreater.cpp @@ -1,4 +1,4 @@ -#include +#include namespace hgl { @@ -16,7 +16,7 @@ namespace hgl ecs_map.Add(name,ec); return(true); } - + ElementCreater *ElementCreater::GetSubElementCreater(const UTF8String &sub_name) { if(sub_name.IsEmpty())return(nullptr); diff --git a/src/xml/ElementParseCreater.cpp b/src/xml/ElementParseCreater.cpp index 4acfa50..d0ec61d 100644 --- a/src/xml/ElementParseCreater.cpp +++ b/src/xml/ElementParseCreater.cpp @@ -1,4 +1,4 @@ -#include +#include namespace hgl { @@ -35,7 +35,7 @@ namespace hgl ecs_stack.Push(cur_ec); } - cur_ec=nullptr; + cur_ec=nullptr; if(ec) { diff --git a/src/xml/ElementParseKV.cpp b/src/xml/ElementParseKV.cpp index 6cde64d..49a578c 100644 --- a/src/xml/ElementParseKV.cpp +++ b/src/xml/ElementParseKV.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace hgl @@ -22,9 +22,9 @@ namespace hgl const bool ElementParseKV::Get(const UTF8String &name,UTF8String &str) { const AttrItem *ai=GetAttrItem(name); - + if(!ai)return(false); - + str=ai->right; return(true); } @@ -32,19 +32,19 @@ namespace hgl const bool ElementParseKV::Get(const UTF8String &name,UTF16String &str) { const AttrItem *ai=GetAttrItem(name); - + if(!ai)return(false); - + str=to_u16(ai->right); return(true); } const bool ElementParseKV::Get(const UTF8String &name,char &ch) - { + { const AttrItem *ai=GetAttrItem(name); - + if(!ai)return(false); - + ch=ai->right.GetBeginChar(); return(true); } @@ -52,10 +52,10 @@ namespace hgl const bool ElementParseKV::Get(const UTF8String &name,bool &value) { const AttrItem *ai=GetAttrItem(name); - + return(ai?stob(ai->right.c_str(),value):false); } - + const bool ElementParseKV::GetHexStr(const UTF8String &name,uint8 *data) { const AttrItem *ai=GetAttrItem(name); diff --git a/src/xml/XMLParseClass.cpp b/src/xml/XMLParseClass.cpp index cb3cc2d..1bfc9c7 100644 --- a/src/xml/XMLParseClass.cpp +++ b/src/xml/XMLParseClass.cpp @@ -23,7 +23,7 @@ namespace hgl { flag=*atts;++atts; info=*atts;++atts; - + ep->Attr(flag,info); }