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
-
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
-
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
-
Deletes a specific object from the list referenced by the pointer.
- Parameters:
-
- obj
- object.
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
public tk_list(): m_head(0), m_tail(0), m_cur(0), 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
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
-
Sets the current object to the last object in the list.
This object is included in the file: tklist.hxx