svt_data_iter Class Reference

Inheritance diagram for class svt_data_iter:

List of all members.


Detailed Description

Virtual base class which defines the iterator interface for iterating over data collectoins.



Public Member Functions

virtual function svt_data_iter  allocate ( )
function svt_data_iter  copy ( )
function bit  find ( svt_data data, bit find_forward = 1 )
virtual function bit  first ( )
virtual function svt_data  get_data ( )
virtual function bit  is_ok ( )
virtual function bit  last ( )
function int  length ( )
function void  new ( vmm_log log )
virtual function bit  next ( )
function int  pos ( )
virtual function bit  prev ( )
virtual function void  reset ( )
function void  svt_check_and_load_verbosity ( )
task   wait_for_next ( )
task   wait_for_prev ( )

Public Attributes

vmm_log  log 


Member Function Documentation

 virtual function svt_data_iter
 svt_data_iter::allocate

 (   ) 


Allocate a new instance of the iterator, setting it up to iterate on the same object in the same fashion. This should be used to create a duplicate iterator on the same object, in the 'reset' position. The copy method should be used to get a duplicate iterator setup at the exact same iterator position.

 Superseding functions 
 svt_data_queue_iter :: allocate 
 svt_transaction_iter :: allocate 

  function svt_data_iter
 svt_data_iter::copy

 (   ) 


Copy the iterator, putting the new iterator at the same position. The default implementation uses the 'get_data' method on the original iterator along with the 'find' method on the new iterator to align the two iterators. As such it could be a costly operation. This may, however, be the only reasonable option for some iterators.

 Superseding functions 
 svt_data_queue_iter :: copy 
 svt_transaction_iter :: copy 

  function bit
 svt_data_iter::find

 (  svt_data data , bit find_forward = 1  ) 


Move the iterator forward (using 'next') or backward (using 'prev') to find the indicated data object. If it moves to the end without finding the data object then the iterator is left in the invalid state.

data - The data to move to.

find_forward - If set to 0 uses prev to find the data object. If set to 1 uses next to find the data object.

Return values - Indicates success (1) or failure (0) of the find.

 virtual function bit
 svt_data_iter::first

 (   ) 


Move to the first element in the collection.

 Superseding functions 
 svt_data_queue_iter :: first 
 svt_transaction_iter :: first 

 virtual function svt_data
 svt_data_iter::get_data

 (   ) 


Access the svt_data object at the current position.

 Superseding functions 
 svt_data_queue_iter :: get_data 
 svt_transaction_iter :: get_data 

 virtual function bit
 svt_data_iter::is_ok

 (   ) 


Evaluate whether the iterator is positioned on an element.

 Superseding functions 
 svt_data_queue_iter :: is_ok 
 svt_transaction_iter :: is_ok 

 virtual function bit
 svt_data_iter::last

 (   ) 


Move to the last element.

 Superseding functions 
 svt_data_queue_iter :: last 
 svt_transaction_iter :: last 

  function int
 svt_data_iter::length

 (   ) 


Get the number of elements. The default implementation does a full scan in order to get the overall length. As such it could be a costly operation. This may, however, be the only reasonable option for some iterators.

 Superseding functions 
 svt_data_queue_iter :: length 

  function void
 svt_data_iter::new

 (  vmm_log log  ) 


CONSTRUCTOR: Creates a new instance of the svt_data_iter class.

 virtual function bit
 svt_data_iter::next

 (   ) 


Move to the next element.

 Superseding functions 
 svt_data_queue_iter :: next 
 svt_transaction_iter :: next 

  function int
 svt_data_iter::pos

 (   ) 


Get the current postion within the overall length. The default implementation scans from the start to the current position in order to calculate the position. As such it could be a costly operation. This may, however, be the only reasonable option for some iterators.

 Superseding functions 
 svt_data_queue_iter :: pos 

 virtual function bit
 svt_data_iter::prev

 (   ) 


Move to the previous element.

 Superseding functions 
 svt_data_queue_iter :: prev 
 svt_transaction_iter :: prev 

 virtual function void
 svt_data_iter::reset

 (   ) 


Reset the iterator.

 Superseding functions 
 svt_data_queue_iter :: reset 
 svt_transaction_iter :: reset 

  function void
 svt_data_iter::svt_check_and_load_verbosity

 (   ) 


Check and load verbosity

  task
 svt_data_iter::wait_for_next

 (   ) 


Move to the next element, but only if there is a next element. If no next element exists (e.g., because the iterator is already on the last element) then the iterator will wait here until a new element is placed at the end of the list. The default implementation generates a fatal error as some iterators may not implement this method.

 Superseding tasks 
 svt_data_queue_iter :: wait_for_next 

  task
 svt_data_iter::wait_for_prev

 (   ) 


Move to the previous element, but only if there is a previous element. If no previous element exists (e.g., because the iterator is already on the first element) then the iterator will wait here until a new element is placed at the front of the list. The default implementation generates a fatal error as some iterators may not implement this method.

 Superseding tasks 
 svt_data_queue_iter :: wait_for_prev 


Member Attribute Documentation

 vmm_log  attribute
 svt_data_iter::log


Log used by this class.