Class: HDLRuby::High::Std::SEnumeratorWrapper
Overview
Describes a sequencer enumerator class that allows to generate HW iterations
over HW or SW objects within sequencers.
This is the wrapper Enumerator over an other one for applying an other
interation method over the first one.
Instance Method Summary
collapse
Methods inherited from SEnumerator
#+, #seach_with_index, #seach_with_object, #with_index, #with_object
#sall?, #sany?, #schain, #schunk, #schunk_while, #scompact, #scount, #scycle, #sdrop, #sdrop_while, #seach_cons, #seach_entry, #seach_slice, #seach_with_index, #seach_with_object, #sfind, #sfind_index, #sfirst, #sflat_map, #sgrep, #sgrep_v, #sgroup_by, #sinclude?, #sinject, #slazy, #smap, #smax, #smax_by, #smin, #smin_by, #sminmax, #sminmax_by, #snone?, #sone?, #spartition, #sreject, #sreverse_each, #sselect, #sslice_after, #sslice_before, #sslice_when, #ssort, #ssort_by, #ssum, #stake, #stake_while, #stally, #sto_a, #sto_h, #suniq, #szip
Constructor Details
Create a new SEnumerator wrapper over +enum+ with +iter+ iteration
method and +args+ argument.
1595
1596
1597
1598
1599
1600
1601
1602
1603
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1595
def initialize(enum,iter,*args)
if enum.is_a?(SEnumerator) then
@enumerator = enum.clone
else
@enumerator = enum.seach
end
@iterator = iter.to_sym
@arguments = args
end
|
Instance Method Details
#access(idx) ⇒ Object
1622
1623
1624
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1622
def access(idx)
return @enumerator.access(idx)
end
|
#clone ⇒ Object
1643
1644
1645
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1643
def clone
return SEnumeratorWrapper.new(@enumerator,@iterator,*@arguments)
end
|
#index ⇒ Object
1618
1619
1620
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1618
def index
return @enumerator.index
end
|
#result ⇒ Object
1614
1615
1616
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1614
def result
return @enumerator.result
end
|
#seach(&ruby_block) ⇒ Object
Iterate over each element.
1648
1649
1650
1651
1652
1653
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1648
def seach(&ruby_block)
return self unless ruby_block
return @enumerator.send(@iterator,*@arguments,&ruby_block)
end
|
#size ⇒ Object
The directly delegate methods.
1606
1607
1608
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1606
def size
return @enumerator.size
end
|
#snext ⇒ Object
1630
1631
1632
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1630
def snext
return @enumerator.snext
end
|
#snext? ⇒ Boolean
1634
1635
1636
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1634
def snext?
return @enumerator.snext?
end
|
#speek ⇒ Object
1626
1627
1628
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1626
def speek
return @enumerator.speek
end
|
#srewind ⇒ Object
1638
1639
1640
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1638
def srewind
return @enumerator.srewind
end
|
#type ⇒ Object
1610
1611
1612
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1610
def type
return @enumerator.type
end
|