engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
rcIntArray类 参考

A simple dynamic array of integers. 更多...

#include <RecastAlloc.h>

Public 成员函数

int & operator[] (int i)
 The value at the specified array index. 更多...
 
const int & operator[] (int i) const
 The value at the specified array index. 更多...
 
int pop ()
 Returns the value at the end of the array and reduces the size by one. 更多...
 
void push (int item)
 Push the specified integer onto the end of the array and increases the size by one. 更多...
 
 rcIntArray ()
 Constructs an instance with an initial array size of zero.
 
 rcIntArray (int n)
 Constructs an instance initialized to the specified size. 更多...
 
void resize (int n)
 Specifies the new size of the integer array. 更多...
 
int size () const
 The current size of the integer array.
 

详细描述

A simple dynamic array of integers.

构造及析构函数说明

◆ rcIntArray()

rcIntArray::rcIntArray ( int  n)
inline

Constructs an instance initialized to the specified size.

参数
[in]nThe initial size of the integer array.

成员函数说明

◆ operator[]() [1/2]

int & rcIntArray::operator[] ( int  i)
inline

The value at the specified array index.

警告
Does not provide overflow protection.
参数
[in]iThe index of the value.

◆ operator[]() [2/2]

const int & rcIntArray::operator[] ( int  i) const
inline

The value at the specified array index.

警告
Does not provide overflow protection.
参数
[in]iThe index of the value.

◆ pop()

int rcIntArray::pop ( )
inline

Returns the value at the end of the array and reduces the size by one.

返回
The value at the end of the array.

◆ push()

void rcIntArray::push ( int  item)
inline

Push the specified integer onto the end of the array and increases the size by one.

参数
[in]itemThe new value.

◆ resize()

void rcIntArray::resize ( int  n)

Specifies the new size of the integer array.

参数
[in]nThe new size of the integer array.

该类的文档由以下文件生成: