diff --git a/inc/hgl/math/PhysicsConst.h b/inc/hgl/math/PhysicsConst.h index 7b8e4a1..119afdb 100644 --- a/inc/hgl/math/PhysicsConst.h +++ b/inc/hgl/math/PhysicsConst.h @@ -95,7 +95,7 @@ namespace hgl } /** - * 摄氏度到开氏度 + * 摄氏度到开尔文度 */ template inline T Celsius2Kelvin(const T &c) @@ -104,7 +104,7 @@ namespace hgl } /** - * 开氏度到摄氏度 + * 开尔文度到摄氏度 */ template inline T Kelvin2Celsius(const T &k) diff --git a/inc/hgl/type/ObjectList.h b/inc/hgl/type/ObjectList.h index 6175a3e..0bf3fe0 100644 --- a/inc/hgl/type/ObjectList.h +++ b/inc/hgl/type/ObjectList.h @@ -33,7 +33,7 @@ namespace hgl return ArrayList::Insert(index,obj); } - virtual void Free() override ///<清除所有数据 + virtual void Free() override ///<清除所有数据并释放缓冲区 { Clear(); ArrayList::Free(); diff --git a/inc/hgl/type/StrChar.h b/inc/hgl/type/StrChar.h index 838fff1..22ac4ca 100644 --- a/inc/hgl/type/StrChar.h +++ b/inc/hgl/type/StrChar.h @@ -1,5 +1,4 @@ -#ifndef HGL_STR_TEMPLATE_INCLUDE -#define HGL_STR_TEMPLATE_INCLUDE +#pragma once #include namespace hgl @@ -2729,7 +2728,6 @@ namespace hgl if(pna->ToNumber(sp,result)) { ++count; - result_list.Add(result); ++p; @@ -3004,7 +3002,7 @@ namespace hgl } /** - * 将一串原始数据转转成16进制数值字符串 + * 将一串原始数据转换成16进制数值字符串 * @param str 16进制数值字符串存入处 * @param src 原始的数据 * @param size 原始数据字节长度 @@ -3056,5 +3054,4 @@ namespace hgl template inline void ToUpperHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr(str,(const uint8 *)data,size,UpperHexChar,gap_char);} template inline void ToLowerHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr(str,(const uint8 *)data,size,LowerHexChar,gap_char);} - }//namespace hgl -#endif//HGL_STR_TEMPLATE_INCLUDE +}//namespace hgl diff --git a/inc/hgl/type/String.h b/inc/hgl/type/String.h index 0520b7a..d51a7a2 100644 --- a/inc/hgl/type/String.h +++ b/inc/hgl/type/String.h @@ -507,9 +507,9 @@ namespace hgl /** * 和一个字符串进行比较 * @param bs 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const SelfClass &bs)const { @@ -525,9 +525,9 @@ namespace hgl /** * 和一个字符串进行比较 * @param str 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const T *str)const { @@ -546,9 +546,9 @@ namespace hgl * 和一个字符串进行比较 * @param pos 起始位置 * @param bs 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const uint pos,const SelfClass &bs)const { @@ -566,9 +566,9 @@ namespace hgl * @param pos 起始位置 * @param bs 比较字符串 * @param num 比较长度 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const uint pos,const SelfClass &bs,const int num)const { @@ -585,9 +585,9 @@ namespace hgl * 和一个字符串进行比较 * @param pos 起始位置 * @param str 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const uint pos,const T *str)const { @@ -607,9 +607,9 @@ namespace hgl * @param pos 起始位置 * @param str 比较字符串 * @param num 比较长度 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const uint pos,const T *str,const int num)const { @@ -625,11 +625,11 @@ namespace hgl } /** - * 和那一个字符串进行比较,英文不区分大小写 + * 和另一个字符串进行比较,英文不区分大小写 * @param bs 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int CaseComp(const SelfClass &bs)const { @@ -645,11 +645,11 @@ namespace hgl } /** - * 和那一个字符串进行比较,英文不区分大小写 + * 和另一个字符串进行比较,英文不区分大小写 * @param str 比较字符串 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int CaseComp(const T *str)const { @@ -665,12 +665,12 @@ namespace hgl } /** - * 和那一个字符串比较指字长度的字符 + * 和另一个字符串比较指定长度的字符 * @param bs 比较字符串 - * @param num 比较字数 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @param num 比较字符数 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const SelfClass &bs,const int num)const { @@ -688,12 +688,12 @@ namespace hgl } /** - * 和那一个字符串比较指字长度的字符 + * 和另一个字符串比较指定长度的字符 * @param str 比较字符串 - * @param num 比较字数 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @param num 比较字符数 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int Comp(const T *str,const int num)const { @@ -709,12 +709,12 @@ namespace hgl } /** - * 和那一个字符串比较指字长度的字符,英文不区分大小写 + * 和另一个字符串比较指定长度的字符,英文不区分大小写 * @param bs 比较字符串 - * @param num 比较字数 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @param num 比较字符数 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int CaseComp(const SelfClass &bs,const int num)const { @@ -725,19 +725,19 @@ namespace hgl return bs.Length(); } - if(bs.Length<=0) + if(bs.Length()<=0) return 1; return data->CaseComp(bs.data->c_str(),num); } /** - * 和那一个字符串比较指字长度的字符,英文不区分大小写 + * 和另一个字符串比较指定长度的字符,英文不区分大小写 * @param str 比较字符串 - * @param num 比较字数 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @param num 比较字符数 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int CaseComp(const T *str,const int num)const { @@ -753,12 +753,12 @@ namespace hgl } /** - * 和那一个字符串比较指字长度的字符,英文不区分大小写 + * 和另一个字符串比较指定长度的字符,英文不区分大小写 * @param str 比较字符串 - * @param num 比较字数 - * @return <0 自身小 - * @return 0 等同 - * @return >0 自身大 + * @param num 比较字符数 + * @return <0 此字符串小于参数字符串 + * @return 0 相等 + * @return >0 此字符串大于参数字符串 */ int CaseComp(const uint pos,const T *str,const int num)const { @@ -932,7 +932,7 @@ namespace hgl * @param sc 新的字符串 * @param start 起始字符索引 * @param n 字符数量 - * @return 成否成功 + * @return 是否成功 */ bool SubString(SelfClass &sc,int start,int n) const ///<取字符串指定段的字符 { diff --git a/inc/hgl/type/StringList.h b/inc/hgl/type/StringList.h index 322c951..5f3a70b 100644 --- a/inc/hgl/type/StringList.h +++ b/inc/hgl/type/StringList.h @@ -192,11 +192,11 @@ namespace hgl } /** - * 查找字符串,英文无视大小写 - * @param str 要指找的字符串 + * 查找字符串,英文不区分大小写 + * @param str 要查找的字符串 * @return 查找到的字符串的索引,未找到返回-1 */ - int CaseFind(const StringClass &str) const ///<查找字符串,英文无视大小写,未找到返回-1 + int CaseFind(const StringClass &str) const ///<查找字符串,英文不区分大小写,未找到返回-1 { const int count=Items.GetCount(); StringClass** sl = Items.GetData(); @@ -211,17 +211,17 @@ namespace hgl } /** - * 确认字符串确在,英文区分大小写 + * 确认字符串存在,英文区分大小写 */ - bool Exist(const StringClass &str) const ///<确认字符串确在,英文区分大小写 + bool Exist(const StringClass &str) const ///<确认字符串存在,英文区分大小写 { return Find(str)!=-1; } /** - * 确认字符串确在,英文无视大小写 + * 确认字符串存在,英文不区分大小写 */ - bool CaseExist(const StringClass &str) const ///<确认字符串确在,英文无视大小写 + bool CaseExist(const StringClass &str) const ///<确认字符串存在,英文不区分大小写 { return CaseFind(str)!=-1; } @@ -248,12 +248,12 @@ namespace hgl } /** - * 查找字符串,英文无视大小写,并指定最大比较长度 - * @param str 要指找的字符串 + * 查找字符串,英文不区分大小写,并指定最大比较长度 + * @param str 要查找的字符串 * @param cn 限定的要查找字符串的最大长度 * @return 查找到的字符串的索引,未找到返回-1 */ - int CaseFind(const StringClass &str,const int cn) const ///<查找字符串,英文无视大小写,未找到返回-1 + int CaseFind(const StringClass &str,const int cn) const ///<查找字符串,英文不区分大小写,未找到返回-1 { const int count=Items.GetCount();