My favorites | Sign in
Project Logo
ffl
                
Search
for
Updated Jun 03, 2009 by dvoudheusden
dni  
Generic Double Linked List Iterator

Module Description

The dni module implements an iterator on the generic double linked list dnl.

Module Words

Iterator structure

dni% ( -- n )

Get the required space for a dni variable

Iterator creation, initialisation and destruction

dni-init ( dnl dni -- )

Initialise the iterator with a dnl list
dni-create ( dnl "<spaces>name" -- ; -- dni )
Create a named iterator in the dictionary with a dnl list
dni-new ( dnl -- dni )
Create an iterator on the heap
dni-free ( dni -- )
Free the iterator from the heap

Member words

dni-get ( dni -- dnn | nil )

Get the current node

Iterator words

dni-first ( dni -- dnn | nil )

Move the iterator to the first node, return this node
dni-next ( dni -- dnn | nil )
Move the iterator to the next node, return this node
dni-prev ( dni -- dnn | nil )
Move the iterator to the previous node, return this node
dni-last ( dni -- dnn | nil )
Move the iterator to the last node, return this node
dni-first? ( dni -- flag )
Check if the iterator is on the first node
dni-last? ( dni -- flag )
Check if the iterator is on the last node

Inspection

dni-dump ( dni -- )

Dump the iterator variable


Generated by ofcfrth-0.10.0

Hosted by Google Code