renamed to "At" instead of "GetPointer"
This commit is contained in:
parent
6316f3cd59
commit
71a6695ab8
@ -48,7 +48,7 @@ namespace hgl
|
||||
|
||||
void *Access(const Block *b) ///<访问一块内存
|
||||
{
|
||||
return b?data_array.GetPointer(b->offset):nullptr;
|
||||
return b?data_array.At(b->offset):nullptr;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
|
@ -83,7 +83,7 @@ namespace hgl
|
||||
|
||||
for(int i=0;i<count;i++)
|
||||
{
|
||||
*da=data_array.GetPointer(*idp);
|
||||
*da=data_array.At(*idp);
|
||||
|
||||
if(*da)++result;
|
||||
|
||||
|
@ -137,7 +137,7 @@ namespace hgl
|
||||
|
||||
const ConstStringView<SC> *GetStringView(const int id)const ///<根据ID取得字符串视图
|
||||
{
|
||||
return str_list.GetPointer(id);
|
||||
return str_list.At(id);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -159,7 +159,7 @@ namespace hgl
|
||||
return items[n];
|
||||
}
|
||||
|
||||
T *GetPointer(int64 n)const
|
||||
T *At(int64 n)const
|
||||
{
|
||||
return (n<0||n>=count)?nullptr:items+n;
|
||||
}
|
||||
|
@ -192,8 +192,8 @@ namespace hgl
|
||||
virtual void operator << (const T &obj){Add(obj);} ///<操作符重载添加一个数据
|
||||
virtual void operator -= (const T &obj){DeleteByValue(obj);} ///<操作符重载删除一个数据
|
||||
|
||||
T * GetPointer(const int index) {return data_array.GetPointer(index);} ///<取得指定序列号数据的索引
|
||||
const T * GetPointer(const int index)const{return data_array.GetPointer(index);} ///<取得指定序列号数据的索引
|
||||
T * At(const int index) {return data_array.At(index);} ///<取得指定序列号数据的索引
|
||||
const T * At(const int index)const{return data_array.At(index);} ///<取得指定序列号数据的索引
|
||||
|
||||
bool Get(int index, T &data)const {return data_array.ReadAt (data,index);} ///<取得指定索引处的数据
|
||||
virtual bool Set(int index,const T &data) {return data_array.WriteAt(data,index);} ///<设置指定索引处的数据
|
||||
|
Loading…
x
Reference in New Issue
Block a user