Class: Fairy::POutputVArray

Inherits:
PIOFilter show all
Defined in:
lib/fairy/node/p-output-varray.rb

Constant Summary collapse

ST_OUTPUT_FINISH =
:ST_OUTPUT_FINISH

Constants inherited from PIOFilter

Fairy::PIOFilter::ST_WAIT_IMPORT

Constants inherited from PFilter

Fairy::PFilter::END_OF_STREAM, Fairy::PFilter::ST_ACTIVATE, Fairy::PFilter::ST_FINISH, Fairy::PFilter::ST_INIT

Instance Attribute Summary

Attributes inherited from PFilter

#IGNORE_EXCEPTION, #id, #log_id, #ntask

Instance Method Summary collapse

Methods inherited from PFilter

#abort_running, #break_running, #each, #global_break, #global_break_from_other, #handle_exception, #key, #key=, #next, #no, #no=, #notice_status, #processor, #start, #start_export, #start_watch_status, #status=, #terminate, #terminate_proc

Constructor Details

#initialize(id, ntask, bjob, opt, idx) ⇒ POutputVArray

def initialize(processor, bjob, opt, varray, idx)



19
20
21
22
# File 'lib/fairy/node/p-output-varray.rb', line 19

def initialize(id, ntask, bjob, opt, idx)
  super
  @no_in_bjob = idx
end

Instance Method Details

#basic_start(&block) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'lib/fairy/node/p-output-varray.rb', line 30

def basic_start(&block)
  array = []
  for l in @input
	array.push l
  end
	
  processor.register_varray_element(array)
  @bjob.varray.arrays_put(@no_in_bjob, array)
  self.status = ST_OUTPUT_FINISH
end

#input=(input) ⇒ Object



24
25
26
27
# File 'lib/fairy/node/p-output-varray.rb', line 24

def input=(input)
  super
  start
end