LuaSTG-x Core API
std::list Class Reference

Public Member Functions

function at (local idx)
 
function back ()
 
function begin ()
 
function clear ()
 
function copy ()
 
function empty ()
 
function end_ ()
 
function erase (local it, local it2)
 
function erase_at (local idx)
 
function front ()
 
function get_allocator ()
 
function insert (local it, local v)
 
function insert_at (local idx, local v)
 
function insert_if (local v, local p)
 
static function islist (local v)
 
function iter ()
 
function iter_rev ()
 
static function list_iter (local lst)
 
static function list_rev_iter (local lst)
 
function pop_back ()
 
function pop_front ()
 
function push_back (local v)
 
function push_front (local v)
 
function remove (local v)
 
function remove_if (local p)
 
function size ()
 

Public Attributes

std::list_iterator _begin
 
std::list_iterator _end
 

Member Function Documentation

◆ at()

function at ( local  idx)

◆ back()

function back ( )

Access last element

Returns the last element in the list container.

Calling this function on an empty container causes error.

◆ begin()

function begin ( )

alloc

Parameters
vany
prevstd.list_iterator
nextstd.list_iterator
Returns
string,std.list_iterator

Return iterator to beginning

Returns an iterator pointing to the first element in the list container.

If the container is empty, the returned iterator value shall not be dereferenced.

◆ clear()

function clear ( )

Clear content

Removes all elements from the list container, and leaving the container with a size of 0.

◆ copy()

function copy ( )

copy

Returns
std.list

◆ empty()

function empty ( )

Test whether container is empty

Returns whether the list container is empty (i.e. whether its size is 0).

◆ end_()

function end_ ( )

Return iterator to end

Returns an iterator referring to the past-the-end element in the list container. It does not point to any element, and thus shall not be dereferenced.

If the container is empty, this function returns the same as list::begin.

◆ erase()

function erase ( local  it,
local  it2 
)

Erase elements

Removes from the list container either a single element (position) or a range of elements ([first,last)).

Return value: An iterator pointing to the element that followed the last element erased by the function call. This is the container end if the operation erased the last element in the sequence.

Parameters
itstd.list_iterator
it2std.list_iterator

◆ erase_at()

function erase_at ( local  idx)

◆ front()

function front ( )

Access first element

Returns the first element in the list container.

Calling this function on an empty container causes error.

◆ get_allocator()

function get_allocator ( )

Get allocator

Returns the allocator object associated with the list container.

◆ insert()

function insert ( local  it,
local  v 
)

Insert elements

The container is extended by inserting new elements before the element at the specified position.

Return value: An iterator that points to the first of the newly inserted elements.

Parameters
itstd.list_iterator
vany
Returns
std.list_iterator

◆ insert_at()

function insert_at ( local  idx,
local  v 
)

◆ insert_if()

function insert_if ( local  v,
local  p 
)

◆ islist()

static function islist ( local  v)

◆ iter()

function iter ( )

◆ iter_rev()

function iter_rev ( )

◆ list_iter()

static function list_iter ( local  lst)

◆ list_rev_iter()

static function list_rev_iter ( local  lst)

◆ pop_back()

function pop_back ( )

Delete last element

Removes the last element in the list container, reducing the container size by one.

◆ pop_front()

function pop_front ( )

Delete first element

Removes the first element in the list container, reducing its size by one.

◆ push_back()

function push_back ( local  v)

Add element at the end

Adds a new element at the end of the list container, after its current last element. This increases the container size by one.

◆ push_front()

function push_front ( local  v)

Insert element at beginning

Inserts a new element at the beginning of the list, right before its current first element. This increases the container size by one.

◆ remove()

function remove ( local  v)

Remove elements with specific value

Removes from the container all the elements that compare equal to v.

◆ remove_if()

function remove_if ( local  p)

Remove elements fulfilling condition

Removes from the container all the elements for which Predicate p returns true.

◆ size()

function size ( )

Return size

Returns the number of elements in the list container.

Returns
number

Member Data Documentation

◆ _begin

◆ _end


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