Class: R2CORBA::INS::BindingIterator
- Inherits:
-
POA::CosNaming::BindingIterator
- Object
- POA::CosNaming::BindingIterator
- R2CORBA::INS::BindingIterator
- Defined in:
- lib/corba/svcs/ins/cos_naming.rb
Overview
Binding iterator servant class
Instance Attribute Summary collapse
-
#oid ⇒ Object
Returns the value of attribute oid.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(reglist, iterator_id) ⇒ BindingIterator
constructor
A new instance of BindingIterator.
- #next_n(how_many) ⇒ Object
- #next_one ⇒ Object
Constructor Details
#initialize(reglist, iterator_id) ⇒ BindingIterator
Returns a new instance of BindingIterator.
71 72 73 74 |
# File 'lib/corba/svcs/ins/cos_naming.rb', line 71 def initialize(reglist, iterator_id) @rl = reglist @id = iterator_id end |
Instance Attribute Details
#oid ⇒ Object
Returns the value of attribute oid.
76 77 78 |
# File 'lib/corba/svcs/ins/cos_naming.rb', line 76 def oid @oid end |
Instance Method Details
#destroy ⇒ Object
94 95 96 97 98 99 |
# File 'lib/corba/svcs/ins/cos_naming.rb', line 94 def destroy poa = self._default_POA poa.deactivate_object(self.oid) @rl.clear INS::NamingContext.clear_iterator(@id) end |
#next_n(how_many) ⇒ Object
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/corba/svcs/ins/cos_naming.rb', line 83 def next_n(how_many) raise CORBA::BAD_PARAM.new if how_many < 1 bindings = [] while how_many>0 and !@rl.empty? reg = @rl.shift bindings << CosNaming::Binding.new(reg[:name], reg[:type]) how_many -= 1 end [!bindings.empty?, bindings] end |
#next_one ⇒ Object
78 79 80 81 |
# File 'lib/corba/svcs/ins/cos_naming.rb', line 78 def next_one reg = @rl.shift [!reg.nil?, reg ? CosNaming::Binding.new(reg[:name], reg[:type]) : nil] end |