This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::ArrayVector Class

This class allows the use of UnigineScript vector.

To use this class, include the UnigineInterpreter.h file.

Unigine::ArrayVector Class

Members


static ArrayVector get (void * interpreter, const Variable & id)

Return a vector from UnigineScript.

Arguments

  • void * interpreter - Interpreter pointer.
  • const Variable & id - Vector ID.

Return value

The vector.

ArrayVector (const ArrayVector & vector)

Copy constructor.

Arguments

  • const ArrayVector & vector - Vector.

~ArrayVector ()

Destructor.

ArrayVector & operator= (const ArrayVector & vector)

Assignment operator for the vector.

Arguments

  • const ArrayVector & vector - Vector to be assigned.

UNIGINE_INLINE const Variable & operator[] (int index) const

Vector access.

Arguments

  • int index - Item index.

Return value

The item.

void set (int index, const Variable & v) const

Set an item by index.

Arguments

  • int index - Item index.
  • const Variable & v - Item to set.

const Variable & get (int index) const

Return an item by index.

Arguments

  • int index - Item index.

Return value

The item.

int size () const

Return vector length.

Return value

Vector length.

void resize (int size) const

Resize a vector.

Arguments

  • int size - New vector capacity.

void clear () const

Clear all items of the vector.

int find (const Variable & v) const

Return an index of a given item.

Arguments

  • const Variable & v - Item.

Return value

Index, if found; otherwise, -1.

void append (const Variable & v) const

Append an item to the vector.

Arguments

  • const Variable & v - Item.

void append (int pos, const Variable & v) const

Append an item to the vector at a given position.

Arguments

  • int pos - Position index.
  • const Variable & v - Item.

void remove (int pos) const

Remove an item from a given position of the vector.

Arguments

  • int pos - Position index.
Last update: 2017-07-03
Build: ()