nodes::safe_list_write_iterator Class Reference

the iterator used for writing the list. More...

#include <safe_list.h>

Collaboration diagram for nodes::safe_list_write_iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void next ()
 proceeds to the next element in the list.
void previous ()
 backtracks to the previous element in the list.
safe_nodeaccess ()
 access the current element.
bool is_head ()
 is iterator at the head?
bool is_tail ()
 is iterator at the tail?
void jump_head ()
 set the iterator to the head.
void jump_tail ()
 set the iterator to the tail.
 ~safe_list_write_iterator ()
 closes down iterator (and removes writer on list).

Protected Member Functions

 safe_list_write_iterator (const safe_list &mgr, safe_list::iterator_positions where)
 opens an iterator on the list (using write access).

Friends

class safe_list

Detailed Description

the iterator used for writing the list.

a note on the iterators: if you obtain a reference to a safe_node, do not try to keep that address around. use it before doing anything else to the iterator or list. another note on iterators: it is REALLY important not to try to open an iterator on a list when you already have an iterator open; this can lead to deadlocks.

Definition at line 183 of file safe_list.h.


Constructor & Destructor Documentation

nodes::safe_list_write_iterator::~safe_list_write_iterator (  ) 

closes down iterator (and removes writer on list).

do not call this; use close_writer instead.

Definition at line 135 of file safe_list.cpp.

References CAST_BACK, and NIL.

nodes::safe_list_write_iterator::safe_list_write_iterator ( const safe_list mgr,
safe_list::iterator_positions  where 
) [protected]

opens an iterator on the list (using write access).

Definition at line 123 of file safe_list.cpp.

References nodes::safe_list::_storage, CAST_BACK, nodes::list::head(), nodes::safe_list::HEAD, NIL, and nodes::list::tail().


Member Function Documentation

void nodes::safe_list_write_iterator::next (  ) 

proceeds to the next element in the list.

Definition at line 154 of file safe_list.cpp.

References CAST_BACK.

Referenced by scheduler::filter_missing_actors(), scheduler::find(), schedule_iterator::next(), scheduler::remove_by_actor(), and scheduler::remove_by_id().

void nodes::safe_list_write_iterator::previous (  ) 

backtracks to the previous element in the list.

Definition at line 160 of file safe_list.cpp.

References CAST_BACK.

Referenced by schedule_iterator::previous().

safe_node * nodes::safe_list_write_iterator::access (  ) 

access the current element.

Definition at line 166 of file safe_list.cpp.

References CAST_BACK, NIL, and UPCAST_NODE.

Referenced by schedule_iterator::access(), scheduler::filter_missing_actors(), scheduler::find(), scheduler::remove_by_actor(), scheduler::remove_by_id(), and scheduler::~scheduler().

bool nodes::safe_list_write_iterator::is_head (  ) 

is iterator at the head?

Definition at line 173 of file safe_list.cpp.

References CAST_BACK.

Referenced by schedule_iterator::is_head().

bool nodes::safe_list_write_iterator::is_tail (  ) 

is iterator at the tail?

Definition at line 179 of file safe_list.cpp.

References CAST_BACK.

Referenced by scheduler::filter_missing_actors(), scheduler::find(), schedule_iterator::is_tail(), scheduler::remove_by_actor(), scheduler::remove_by_id(), and scheduler::~scheduler().

void nodes::safe_list_write_iterator::jump_head (  ) 

set the iterator to the head.

Definition at line 142 of file safe_list.cpp.

References CAST_BACK.

Referenced by schedule_iterator::jump_head().

void nodes::safe_list_write_iterator::jump_tail (  ) 

set the iterator to the tail.

Definition at line 148 of file safe_list.cpp.

References CAST_BACK.

Referenced by schedule_iterator::jump_tail().


Friends And Related Function Documentation

friend class safe_list [friend]

Definition at line 206 of file safe_list.h.


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:31:07 2008 for HOOPLE Libraries by  doxygen 1.5.1