Planeshift
Public Member Functions

rcIntArray Class Reference

A simple dynamic array of integers. More...

#include <RecastAlloc.h>

List of all members.

Public Member Functions

const intoperator[] (int i) const
 The value at the specified array index.
intoperator[] (int i)
 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.
 ~rcIntArray ()

Detailed Description

A simple dynamic array of integers.

Definition at line 61 of file RecastAlloc.h.


Constructor & Destructor Documentation

rcIntArray::rcIntArray ( ) [inline]

Constructs an instance with an initial array size of zero.

Definition at line 70 of file RecastAlloc.h.

rcIntArray::rcIntArray ( int  n) [inline]

Constructs an instance initialized to the specified size.

Parameters:
[in]nThe initial size of the integer array.

Definition at line 74 of file RecastAlloc.h.

rcIntArray::~rcIntArray ( ) [inline]

Definition at line 75 of file RecastAlloc.h.


Member Function Documentation

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

The value at the specified array index.

Warning:
Does not provide overflow protection.
Parameters:
[in]iThe index of the value.

Definition at line 92 of file RecastAlloc.h.

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

The value at the specified array index.

Warning:
Does not provide overflow protection.
Parameters:
[in]iThe index of the value.

Definition at line 97 of file RecastAlloc.h.

int rcIntArray::pop ( ) [inline]

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

Returns:
The value at the end of the array.

Definition at line 87 of file RecastAlloc.h.

void rcIntArray::push ( int  item) [inline]

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

Parameters:
[in]itemThe new value.

Definition at line 83 of file RecastAlloc.h.

void rcIntArray::resize ( int  n)

Specifies the new size of the integer array.

Parameters:
[in]nThe new size of the integer array.
int rcIntArray::size ( ) const [inline]

The current size of the integer array.

Definition at line 100 of file RecastAlloc.h.


The documentation for this class was generated from the following file: