STL Container IB Reference

From CometWiki

Revision as of 23:49, 22 November 2011 by Skrach (Talk | contribs)
Jump to: navigation, search

Contents

Core Functions

Vector

stlPushBack( <container-name>, <data> ) adds an element to the end of the vector
stlPopBack( <container-name> ) removes the element at the end of the vector
stlFront( <container-name> ) gets the element at the front of the vector
stlBack( <container-name> ) gets the element at the end of the vector
stlSet <container-name> <index> <data> sets the element at the index specified
<container-name>( <index> ) gets the element at the index specified

Similar to arrays, vectors are mostly used to access data based on a numeric index, thus the () operator and stlSet are going to be your bread and butter functions for this container. stlPushBack is a great way to programatically build a vector - it will append the specified data to the end of the vector, and increase its size by 1. If you want to remove the last element, you would use stlPopBack. Then the stlFront and stlBack functions have been included as shortcuts for accessing the first and last elements respectively.

List

stlPushBack( <container-name>, <data> ) adds and element to the end of the list
stlPopBack( <container-name> ) removes the element at the end of the list
stlPushFront( <container-name>, <data> ) adds and element to the beginning of the list
stlPopFront( <container-name> ) removes the element at the beginning of the list
stlFront( <container-name> ) gets the element at the beginning of the list
stlBack( <container-name> ) gets the element at the end of the list

Map

Stack

Queue

Utility Functions

Meta Functions

Personal tools