asIScriptArray Class Reference
[Interfaces]
The interface for a script array object.
List of all members.
|
Public Member Functions |
virtual int | AddRef ()=0 |
| Increase reference counter.
|
virtual int | Release ()=0 |
| Decrease reference counter.
|
virtual int | GetArrayTypeId ()=0 |
| Returns the type id of the array object.
|
virtual int | GetElementTypeId ()=0 |
| Returns the type id of the contained elements.
|
virtual asUINT | GetElementCount ()=0 |
| Returns the size of the array.
|
virtual void * | GetElementPointer (asUINT index)=0 |
| Returns a pointer to the element referenced by index.
|
virtual void | Resize (asUINT size)=0 |
| Resizes the array.
|
virtual int | CopyFrom (asIScriptArray *other)=0 |
| Copies the elements from another array, overwriting the current content.
|
Member Function Documentation
virtual int asIScriptArray::AddRef |
( |
|
) |
[pure virtual] |
- Returns:
- The number of references to this object.
Call this method when storing an additional reference to the object.
virtual int asIScriptArray::Release |
( |
|
) |
[pure virtual] |
- Returns:
- The number of references to this object.
Call this method when you will no longer use the references that you own.
virtual int asIScriptArray::GetArrayTypeId |
( |
|
) |
[pure virtual] |
- Returns:
- The type id of the array object.
virtual int asIScriptArray::GetElementTypeId |
( |
|
) |
[pure virtual] |
- Returns:
- The type id of the array elements.
virtual asUINT asIScriptArray::GetElementCount |
( |
|
) |
[pure virtual] |
- Returns:
- The number of elements in the array.
virtual void* asIScriptArray::GetElementPointer |
( |
asUINT |
index |
) |
[pure virtual] |
- Parameters:
-
[in] | index | The element index. |
- Returns:
- A pointer to the element value.
The method returns a pointer to the memory location for the element. Use the type id for the element to determine the content of the pointer, and how to handle it.
virtual void asIScriptArray::Resize |
( |
asUINT |
size |
) |
[pure virtual] |
- Parameters:
-
[in] | size | The new size of the array. |
This method allows the application to resize the array.
virtual int asIScriptArray::CopyFrom |
( |
asIScriptArray * |
other |
) |
[pure virtual] |
- Parameters:
-
[in] | other | A pointer to the source array. |
- Returns:
- A negative value on error.
- Return values:
-
| asINVALID_ARG | The argument is null. |
| asINVALID_TYPE | The other array is of different type. |
This method copies the contents of the other object to this one.