Logo Search packages:      
Sourcecode: inkscape version File versions

template<typename T>
MutableList< T > & Inkscape::Util::rest ( MutableList< T > const &  list  )  [inline]

Returns a reference to the remainder of a linked list after the first element.

Returns a reference to the remainder of the list after the first element (its "tail"). For MutableList<>, rest() can be used as an lvalue, to set a new tail.

For example:

rest(list) = other;

Results of calling this on an empty list are undefined.

See also:
cons<>

is_empty<>

Parameters:
list the list; cannot be empty
Returns:
a reference to the remainder of the list

Definition at line 365 of file list.h.

Referenced by Inkscape::XML::SimpleNode::setAttribute(), and unclump().

                                                        {
    return reinterpret_cast<MutableList<T> &>(list._cell->next);
}


Generated by  Doxygen 1.6.0   Back to index