All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

SPAkern Class tk_list

SPAbase.ACIS_OBJECT
  |
  +---tk_list
 

Usage: you must use this class as is. You should never derive it.


public class tk_list

Base class that can be used to manage a list of items.


Constructor and Destructor Index


o ~tk_list()
Deletes this object when it goes out of scope.

Method Index


o add_after(tk_list_object*)
Adds the object after the current position.
o add_before(tk_list_object*)
Adds the object before the current position

o add_head(tk_list_object*)
Adds the object to the head of the list.
o add_tail(tk_list_object*)
Adds the object to the end of the list.
o count()
Returns number of objects in the list.
o del()
Deletes the current object from the list.
o del_head()
Deletes an object from the head of the list and returns a pointer to the deleted object.
o del_object(tk_list_object*)
Deletes a specific object from the list referenced by the pointer.
o del_tail()
Deletes an object from the end of the list and returns a pointer to the deleted object.
o get_current()
Returns the current object from the list.
o head()
Sets the current object to the first object in the list.
o m_count(0)
Default constructor.
o next()
Moves the current object to the next item in the list.
o pop()
Pops an object from the end of the list.
o prev()
Moves the current object to the previous item in the list.
o push(tk_list_object*)
Pushes an object to the end of the list.
o set_current(tk_list_object*)
Sets the current object to the object referenced by the pointer.
o tail()
Sets the current object to the last object in the list.

Constructor and Destructor


o ~tk_list
public ~tk_list()
Deletes this object when it goes out of scope.

Role: Deletes this object when it goes out of scope. However deleting the object would not delete the items in the list.

Methods


o add_after
public void add_after(tk_list_object* obj)
Adds the object after the current position.

Parameters:
obj
object.
o add_before
public void add_before(tk_list_object* obj)
Adds the object before the current position

Parameters:
obj
object.
o add_head
public void add_head(tk_list_object* obj)
Adds the object to the head of the list.

Parameters:
obj
object.
o add_tail
public void add_tail(tk_list_object* obj)
Adds the object to the end of the list.

Parameters:
obj
object.
o count
public int count()
Returns number of objects in the list.
o del
public tk_list_object * del()
Deletes the current object from the list.
o del_head
public tk_list_object * del_head()
Deletes an object from the head of the list and returns a pointer to the deleted object.
o del_object
public tk_list_object * del_object(tk_list_object* obj)
Deletes a specific object from the list referenced by the pointer.

Parameters:
obj
object.
o del_tail
public tk_list_object * del_tail()
Deletes an object from the end of the list and returns a pointer to the deleted object.
o get_current
public tk_list_object * get_current()
Returns the current object from the list.
o head
public tk_list_object * head()
Sets the current object to the first object in the list.
o m_count
public tk_list(): m_head(0), m_tail(0), m_cur(0), m_count(0 )
Default constructor.
o next
public tk_list_object * next()
Moves the current object to the next item in the list.
o pop
public tk_list_object * pop()
Pops an object from the end of the list.
o prev
public tk_list_object * prev()
Moves the current object to the previous item in the list.
o push
public void push(tk_list_object* obj)
Pushes an object to the end of the list.

Parameters:
obj
object.
o set_current
public void set_current(tk_list_object* obj)
Sets the current object to the object referenced by the pointer.

Parameters:
obj
object.
o tail
public tk_list_object * tail()
Sets the current object to the last object in the list.

This object is included in the file: tklist.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.