Class: NotifierPlugin::DataqueueHandlerType

Inherits:
BaseHandlerType show all
Defined in:
lib/tecsgen/plugin/NotifierPlugin.rb

Instance Attribute Summary

Attributes inherited from BaseHandlerType

#required_attributes

Instance Method Summary collapse

Methods inherited from BaseHandlerType

#gen_cfg_handler_type, #generate_attr_map

Constructor Details

#initializeDataqueueHandlerType

Returns a new instance of DataqueueHandlerType.


785
786
787
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 785

def initialize
  super
end

Instance Method Details

#gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen) ⇒ Object


794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 794

def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
  dataqueueCell = join.get_cell
  id_attr_join = dataqueueCell.get_join_list.get_item(:id)
  id_attr = join.get_rhs_cell.get_celltype.find(:id)
  if id_attr_join
    # セル生成時に初期化する場合
    id = id_attr_join.get_rhs.to_s
  else
    # セルタイプの初期化値を使う場合
    id = id_attr.get_initializer.to_s
  end

  # $id$等の置換
  name_array = dataqueueCell.get_celltype.get_name_array(dataqueueCell)
  id = dataqueueCell.get_celltype.subst_name(id, name_array)

  name_array = cell.get_celltype.get_name_array(cell)

      return [id]
end

#might_failObject


815
816
817
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 815

def might_fail
  return true
end

#validate_join(handler, cell, join, *args) ⇒ Object


789
790
791
792
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 789

def validate_join(handler, cell, join, *args)
  return super(handler, cell, join, *args) &&
    join && join.get_rhs_cell.get_celltype.get_name == :tDataqueue
end