support for each
This commit is contained in:
parent
7d8adb18c6
commit
d79e3d0219
@ -29,6 +29,9 @@ namespace hgl
|
|||||||
T * GetBegin (){return (items&&count>0)?items:nullptr;} ///<取得第一个数据项指针
|
T * GetBegin (){return (items&&count>0)?items:nullptr;} ///<取得第一个数据项指针
|
||||||
T * GetEnd (){return (items&&count>0)?items+count-1:nullptr;} ///<取得最后一个数据项指针
|
T * GetEnd (){return (items&&count>0)?items+count-1:nullptr;} ///<取得最后一个数据项指针
|
||||||
|
|
||||||
|
T * begin()const{return items;}
|
||||||
|
T * end()const{return items+count;}
|
||||||
|
|
||||||
public: //方法
|
public: //方法
|
||||||
|
|
||||||
List(){}; ///<本类构造函数
|
List(){}; ///<本类构造函数
|
||||||
|
@ -22,6 +22,11 @@ namespace hgl
|
|||||||
DataPairPool data_pool;
|
DataPairPool data_pool;
|
||||||
DataPairList data_list;
|
DataPairList data_list;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
const DataPair *begin()const{return data_list.begin();}
|
||||||
|
const DataPair *end()const{return data_list.end();}
|
||||||
|
|
||||||
public: //方法
|
public: //方法
|
||||||
|
|
||||||
_Map()=default;
|
_Map()=default;
|
||||||
|
@ -30,6 +30,9 @@ namespace hgl
|
|||||||
int GetMaxCount ()const{return max_count;} ///<取得最大数量
|
int GetMaxCount ()const{return max_count;} ///<取得最大数量
|
||||||
bool SetMaxCount (int); ///<设置最大数量
|
bool SetMaxCount (int); ///<设置最大数量
|
||||||
|
|
||||||
|
const T *begin()const{return items;}
|
||||||
|
const T *end()const{return items+cur_count;}
|
||||||
|
|
||||||
public: //方法
|
public: //方法
|
||||||
|
|
||||||
Queue(int=0);
|
Queue(int=0);
|
||||||
|
@ -22,6 +22,9 @@ namespace hgl
|
|||||||
T * GetData ()const{return data_list.GetData();} ///<取得数据指针
|
T * GetData ()const{return data_list.GetData();} ///<取得数据指针
|
||||||
int GetCount ()const{return data_list.GetCount();} ///<取得数据总量
|
int GetCount ()const{return data_list.GetCount();} ///<取得数据总量
|
||||||
|
|
||||||
|
T * begin ()const{return data_list.begin();}
|
||||||
|
T * end ()const{return data_list.end();}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Sets()=default;
|
Sets()=default;
|
||||||
|
@ -27,6 +27,9 @@ namespace hgl
|
|||||||
T **GetDataList()const{return Items.GetData();} ///<取得字符串列表指针数据
|
T **GetDataList()const{return Items.GetData();} ///<取得字符串列表指针数据
|
||||||
const int GetCount()const{return Items.GetCount();} ///<字符串列表行数虚拟变量
|
const int GetCount()const{return Items.GetCount();} ///<字符串列表行数虚拟变量
|
||||||
|
|
||||||
|
T **begin() const{return Items.GetData();}
|
||||||
|
T **end() const{return Items.GetData()+Items.GetCount();}
|
||||||
|
|
||||||
public: //操作符重载
|
public: //操作符重载
|
||||||
|
|
||||||
T &operator[](int n)const
|
T &operator[](int n)const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user