Class: NotifierPlugin::IncrementVariableHandlerType

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

#generate_attr_map, #might_fail

Constructor Details

#initializeIncrementVariableHandlerType

Returns a new instance of IncrementVariableHandlerType.



669
670
671
672
673
674
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 669

def initialize
  super
  @required_attributes = [
    INCVAR_ADDR_ATTR
  ] # .to_set
end

Instance Method Details

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



681
682
683
684
685
686
687
688
689
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 681

def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
  var_addr = attrMap[INCVAR_ADDR_ATTR].get_rhs.to_s

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

      return [var_addr]
end

#gen_cfg_handler_type(handler) ⇒ Object



691
692
693
694
695
696
697
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 691

def gen_cfg_handler_type(handler)
  case handler
    when EVENT_HANDLER then return "TNFY_INCVAR"
    when ERROR_HANDLER then return "TENFY_INCVAR"
    else raise "unknown handler #{handler}"
  end
end

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



676
677
678
679
# File 'lib/tecsgen/plugin/NotifierPlugin.rb', line 676

def validate_join(handler, cell, join, *args)
  return super(handler, cell, join, *args) &&
    join.nil?
end