Class: Ragweed::Wrap32::Overlapped
- Defined in:
- lib/ragweed/wrap32/overlapped.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#internal ⇒ Object
Returns the value of attribute internal.
-
#internal_high ⇒ Object
Returns the value of attribute internal_high.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#offset_high ⇒ Object
Returns the value of attribute offset_high.
-
#target ⇒ Object
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(str = nil) ⇒ Overlapped
constructor
A new instance of Overlapped.
- #release ⇒ Object
- #to_s ⇒ Object
- #wait(h) ⇒ Object
Constructor Details
#initialize(str = nil) ⇒ Overlapped
Returns a new instance of Overlapped.
16 17 18 19 20 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 16 def initialize(str=nil) @buf = "\x00" * 20 @internal, @internal_high, @offset, @offset_high, @event = [0,0,0,0,0] init(str) if str end |
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event.
6 7 8 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 6 def event @event end |
#internal ⇒ Object
Returns the value of attribute internal.
2 3 4 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 2 def internal @internal end |
#internal_high ⇒ Object
Returns the value of attribute internal_high.
3 4 5 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 3 def internal_high @internal_high end |
#offset ⇒ Object
Returns the value of attribute offset.
4 5 6 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 4 def offset @offset end |
#offset_high ⇒ Object
Returns the value of attribute offset_high.
5 6 7 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 5 def offset_high @offset_high end |
#target ⇒ Object
Returns the value of attribute target.
7 8 9 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 7 def target @target end |
Class Method Details
.get ⇒ Object
9 10 11 12 13 14 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 9 def self.get h = Ragweed::Wrap32::create_event(nil, false, true) r = self.new r.event = h return r end |
Instance Method Details
#release ⇒ Object
27 28 29 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 27 def release Ragweed::Wrap32::close_handle(@event) end |
#to_s ⇒ Object
22 23 24 25 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 22 def to_s buf = [@internal, @internal_high, @offset, @offset_high, @event].pack("LLLLL") @buf.replace(buf) end |
#wait(h) ⇒ Object
31 32 33 34 35 |
# File 'lib/ragweed/wrap32/overlapped.rb', line 31 def wait(h) return if not @event Ragweed::Wrap32::wait_for_single_object(@event) Ragweed::Wrap32::get_overlapped_result(h, self) end |