Class uvm_visitor
- uvm_pkg :: uvm_void
Name |
Default value |
Description |
---|---|---|
NODE |
uvm_component |
Constructors
Functions
- virtual function void visit ( uvm_component node ) [source]
This method will be invoked by the visitor for every visited node of the provided structure. The user is expected to provide the own functionality in this function.
class count_nodes_visitor#(type T=uvm_component) extends uvm_visitor#(T); function new (string name = ""); super.new(name); endfunction local int cnt; virtual function void begin_v(); cnt = 0; endfunction virtual function void end_v(); uvm_info("TEXT",$sformatf("%d elements",cnt),UVM_NONE) endfunction virtual function void visit(T node); cnt++; endfunction endclass
×
CLASS
uvm_visitor #(NODE)
The uvm_visitor class provides an abstract base class for a visitor. The visitor visits instances of type NODE. For general information regarding the visitor pattern see http://en.wikipedia.org/wiki/Visitor_pattern