Class: NotifierPlugin::SetEventflagHandlerType
- Inherits:
-
BaseHandlerType
- Object
- BaseHandlerType
- NotifierPlugin::SetEventflagHandlerType
- Defined in:
- lib/tecsgen/plugin/NotifierPlugin.rb
Instance Attribute Summary
Attributes inherited from BaseHandlerType
Instance Method Summary collapse
- #gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen) ⇒ Object
- #gen_cfg_handler_type(handler) ⇒ Object
-
#initialize ⇒ SetEventflagHandlerType
constructor
A new instance of SetEventflagHandlerType.
- #might_fail ⇒ Object
- #validate_join(handler, cell, join, *args) ⇒ Object
Methods inherited from BaseHandlerType
Constructor Details
#initialize ⇒ SetEventflagHandlerType
Returns a new instance of SetEventflagHandlerType.
737 738 739 740 741 742 |
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 737 def initialize super @required_attributes = [ SETFLG_FLAG_ATTR ] # .to_set end |
Instance Method Details
#gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen) ⇒ Object
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 749 def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen) eventflagCell = join.get_cell id_attr_join = eventflagCell.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 flg_pattern = attrMap[SETFLG_FLAG_ATTR].get_rhs.to_s # $id$等の置換 name_array = eventflagCell.get_celltype.get_name_array(eventflagCell) id = eventflagCell.get_celltype.subst_name(id, name_array) name_array = cell.get_celltype.get_name_array(cell) flg_pattern = cell.get_celltype.subst_name(flg_pattern, name_array) return [id, flg_pattern] end |
#gen_cfg_handler_type(handler) ⇒ Object
776 777 778 779 780 781 782 |
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 776 def gen_cfg_handler_type(handler) case handler when EVENT_HANDLER then return "TNFY_SETFLG" when ERROR_HANDLER then return "TENFY_SETFLG" else raise "unknown handler #{handler}" end end |
#might_fail ⇒ Object
772 773 774 |
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 772 def might_fail return true end |
#validate_join(handler, cell, join, *args) ⇒ Object
744 745 746 747 |
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 744 def validate_join(handler, cell, join, *args) return super(handler, cell, join, *args) && join && join.get_rhs_cell.get_celltype.get_name == :tEventflag end |