svt_sequence_item_base_iter Class Reference

Inheritance diagram for class svt_sequence_item_base_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_sequence_item_base_iter  allocate ( )
function svt_sequence_item_base_iter  copy ( )
function bit  find ( svt_sequence_item_base data, bit find_forward = 1 )
virtual function bit  first ( )
virtual function svt_sequence_item_base  get_data ( )
function string  get_type_name ( )
virtual function bit  is_ok ( )
virtual function bit  last ( )
function int  length ( )
function void  new ( uvm_report_object reporter )
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

uvm_report_object  reporter 


Member Function Documentation

 virtual function svt_sequence_item_base_iter
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: allocate 
 svt_sequence_item_iter :: allocate 

  function svt_sequence_item_base_iter
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: copy 
 svt_sequence_item_iter :: copy 

  function bit
 svt_sequence_item_base_iter::find

 (  svt_sequence_item_base 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_sequence_item_base_iter::first

 (   ) 


Move to the first element in the collection.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: first 
 svt_sequence_item_iter :: first 

 virtual function svt_sequence_item_base
 svt_sequence_item_base_iter::get_data

 (   ) 


Access the svt_sequence_item_base object at the current position.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: get_data 
 svt_sequence_item_iter :: get_data 

  function string
 svt_sequence_item_base_iter::get_type_name

 (   ) 


Returns this class' name as a string.

 virtual function bit
 svt_sequence_item_base_iter::is_ok

 (   ) 


Evaluate whether the iterator is positioned on an element.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: is_ok 
 svt_sequence_item_iter :: is_ok 

 virtual function bit
 svt_sequence_item_base_iter::last

 (   ) 


Move to the last element.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: last 
 svt_sequence_item_iter :: last 

  function int
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: length 

  function void
 svt_sequence_item_base_iter::new

 (  uvm_report_object reporter  ) 


CONSTRUCTOR: Creates a new instance of the svt_sequence_item_base_iter class.

 virtual function bit
 svt_sequence_item_base_iter::next

 (   ) 


Move to the next element.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: next 
 svt_sequence_item_iter :: next 

  function int
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: pos 

 virtual function bit
 svt_sequence_item_base_iter::prev

 (   ) 


Move to the previous element.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: prev 
 svt_sequence_item_iter :: prev 

 virtual function void
 svt_sequence_item_base_iter::reset

 (   ) 


Reset the iterator.

 Superseding functions 
 svt_sequence_item_base_queue_iter :: reset 
 svt_sequence_item_iter :: reset 

  function void
 svt_sequence_item_base_iter::svt_check_and_load_verbosity

 (   ) 


Check and load verbosity

  task
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: wait_for_next 

  task
 svt_sequence_item_base_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_sequence_item_base_queue_iter :: wait_for_prev 


Member Attribute Documentation

 uvm_report_object  attribute
 svt_sequence_item_base_iter::reporter


Reporter used by this class.