Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb

    r359 r374  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2017 by TOPPERS Project
     6#   Copyright (C) 2008-2019 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    149149    end
    150150
    151     set_descriptor_list
     151    # set_descriptor_list ##
    152152
    153153    if @generate then
     
    364364  end
    365365
     366  @@set_descriptor_list = {}
     367  def self.set_descriptor_list
     368    Namespace.get_root.travers_all_signature{ |sig|
     369      if @@set_descriptor_list[ sig ] == nil then
     370        @@set_descriptor_list[ sig ] = true
     371        sig.set_descriptor_list
     372      end
     373    }
     374  end
     375
    366376  #== Signature# 引数で参照されている Descriptor 型のリストを作成する
    367377  def set_descriptor_list
     
    538548# @ct_factory_list::    Factory[] :    celltype factory
    539549# @cell_list:: Cell[] : 定義のみ (V1.0.0.2 以降)
     550# @ordered_cell_list:: Cell[] : ID 順に順序付けされたセルリスト、最適化以降有効 (リンク単位ごとに生成されなおす)
    540551# @singleton:: bool
    541552# @idx_is_id:: bool
    542553# @idx_is_id_act:: bool: actual value
     554# @b_need_ptab:: bool: true if having cells in multi-domain
    543555# @active:: bool
    544556# @b_reuse:: bool :  reuse 指定されて import された(template 不要)
     
    654666    if $idx_is_id then
    655667      @idx_is_id = true
     668      @idx_is_id_act = true
     669      @b_need_ptab = true
    656670    else
    657671      @idx_is_id = false
    658     end
    659     @idx_is_id_act = @idx_is_id
     672      @idx_is_id_act = false
     673      @b_need_ptab = false
     674    end
    660675
    661676    Namespace.new_celltype( self )
     
    700715    end
    701716
    702     check_dynamic_join
     717    # check_dynamic_join ##
    703718
    704719    @@current_object = nil
     
    886901        @idx_is_id = true
    887902        @idx_is_id_act = true
     903        @b_need_ptab = true
    888904      when :ACTIVE
    889905        @active = true
     
    899915    if @singleton then
    900916      @idx_is_id_act = false
     917      @b_need_ptab = false
    901918    end
    902919  end
     
    9991016  end
    10001017
     1018  @@dynamic_join_checked_list = {}
     1019  def self.check_dynamic_join
     1020    Namespace.get_root.travers_all_celltype{ |ct|
     1021      if @@dynamic_join_checked_list[ ct ] == nil then
     1022        @@dynamic_join_checked_list[ ct ] = true
     1023        ct.check_dynamic_join
     1024      end
     1025    }
     1026  end
     1027
    10011028  #=== Celltype#dynamic の適合性チェック
    10021029  def check_dynamic_join
     1030    return if ! $verbose
    10031031    @port.each{ |port|
    10041032      signature = port.get_signature
     
    10381066              end
    10391067            end
    1040             cdl_warning( 'W9999 "$1" cannot handle Descriptor "$2" infromation for port "$3"', @name, param.get_name, port.get_name )
     1068            cdl_warning( 'W9999 "$1" cannot handle Descriptor "$2" information for port "$3"', @name, param.get_name, port.get_name )
    10411069          }
    10421070        end
     
    11431171  #     呼び口(ただし、最適化で不要となるものは除く)
    11441172  def has_INIB?
    1145 #    print "name=#{@name} @n_attribute_ro=#{@n_attribute_ro}  @n_var_size_is=#{@n_var_size_is} @n_call_port=#{@n_call_port} @n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} @n_entry_port_array_ns=#{@n_entry_port_array_ns}\n"
    1146     return $rom &&
    1147       (@n_attribute_ro > 0 ||
    1148        @n_var_size_is > 0 ||
    1149        ( @n_call_port - @n_call_port_omitted_in_CB - (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 ||
    1150        $ram_initializer && @n_call_port_dynamic ||
    1151        @n_entry_port_array_ns > 0)
    1152 #    return $rom && (@n_attribute_ro > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0)
     1173
     1174    result = $rom &&
     1175             (@n_attribute_ro > 0 ||
     1176              @n_var_size_is > 0 ||
     1177              ( @n_call_port - @n_call_port_omitted_in_CB - (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 ||
     1178              $ram_initializer && @n_call_port_dynamic > 0 ||
     1179              @n_entry_port_array_ns > 0)
     1180    # print "name=#{@name} n_attribute_ro=#{@n_attribute_ro}  n_var_size_is=#{@n_var_size_is} n_call_port=#{@n_call_port} n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} n_call_port_dynamic=#{@n_call_port_dynamic} n_call_port_array_dynamic=#{@n_call_port_array_dynamic} n_entry_port_array_ns=#{@n_entry_port_array_ns} has_INIB?=#{result}\n"
     1181
     1182    return result
    11531183  end
    11541184
     
    12311261  def idx_is_id_act?
    12321262    @idx_is_id_act
     1263  end
     1264
     1265  def multi_domain?
     1266    @b_need_ptab
    12331267  end
    12341268
     
    13531387#                                               逆require ポートに対して複数の結合がないかチェックする
    13541388# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin は生成後に追加される
     1389# @b_post_code_generated:: Bool: true if generated in tmp_plugin_post_code.cdl
    13551390#
    13561391# composite のためインスタンス変数
     
    13751410# @id:: Integer : コード生成直前に設定  (プロトタイプ宣言の場合は -1 のまま放置)
    13761411# @id_specified::Integer : 指定された id
    1377 # @restrict_list::{ entry_name => { func_name, [ region_name, ... ] } }
     1412# @restrict_list::{ entry_name => { func_name, [ region_path_str, ... ] } }
     1413# @restrict_list2::{ entry_name => { func_name, [ domain_root_region, ... ] } }
     1414# @b_restrict_referenced::Bool: restrict_list が参照れた
    13781415
    13791416=begin
     
    14591496    @referenced_port_list = {}
    14601497    @restrict_list = {}
     1498    @restrict_list2 = {}
     1499    @b_restrict_referenced = false
     1500    @b_post_code_generated = false
    14611501
    14621502    @cell_list = {}
     
    18031843      set_specifier_list( Generator.get_statement_specifier )
    18041844    end
     1845    if TECSGEN.post_coded?
     1846      @b_post_code_generated = true
     1847    end
    18051848    set_f_def f_def
    18061849
     
    18201863    if ! @in_composite then
    18211864      # if @celltype.instance_of? Celltype then
     1865      if @celltype then  # composite でも呼びだす, エラー時 nil
    18221866        @celltype.new_cell self
    1823       # end
     1867      end
    18241868      @@cell_list << self
    18251869    end
     
    21322176  end
    21332177
     2178  #=== Cell# composite のセルか?
     2179  def is_of_composite?
     2180    if @celltype.kind_of? CompositeCelltype
     2181      return true
     2182    else
     2183      return false
     2184    end
     2185  end
     2186
     2187  #=== Cell# tmp_plugin_post_code.cdl で生成されたセルか?
     2188  def post_code_generated?
     2189    @b_post_code_generated
     2190  end
     2191
    21342192  # composite cell の port に対応する内部の cell の port の名前(リンク時に必要な名前)
    21352193  def get_real_global_name port_name
     
    22192277
    22202278      # セルタイプ内で port_name の CompositeCelltypeJoin を探す(コード生成段階では必ず見つかる)
     2279      # print "get_real_cell: cell=#{@name} port=#{port_name}\n"
     2280      # pp @cell_list
    22212281      cj = @celltype.find_export( port_name )
    22222282
     
    22302290  end
    22312291
     2292  #=== Cell#get_real_celltype
     2293  #
     2294  def get_real_celltype( port_name )
     2295    if @celltype.instance_of?( CompositeCelltype ) then
     2296      return @celltype.get_real_celltype port_name
     2297    else
     2298      return @celltype
     2299    end
     2300  end
    22322301
    22332302  #=== Cell# 受け口のport の参照カウントをアップする
     
    22702339      return "#{@global_name}_#{port_name}"
    22712340    end
     2341  end
     2342
     2343  #Cell#属性の初期値を得る
     2344  #attr_name::Symbol  必ず初期化されていないと Ruby 例外となる
     2345  def get_attr_initializer attr_name
     2346    val = @join_list.get_item( attr_name )
     2347    if val == nil then
     2348      val = (@celltype.find  attr_name).get_initializer
     2349    else
     2350      val = val.get_rhs
     2351    end
     2352    return val
    22722353  end
    22732354
     
    25202601        else
    25212602          cell = j.get_rhs_cell2
    2522           next if cell == nil     # 右辺が見つからなかった.既にエラー
     2603          next if cell == nil || cell.get_celltype == nil     # 右辺が見つからなかった.既にエラー
    25232604          port = cell.get_celltype.find( j.get_rhs_port2 )
     2605          if port == nil then
     2606            dbgPrint "set_port_ref: #{@name}.#{j.get_name} = #{cell.get_name}.#{j.get_rhs_port2}\n"
     2607            # through プラグインで生成されたセルの受け口が見つからないケース (のハズ)
     2608            cdl_error( "entry '$1' not found in '$2' refered from $3.$4", j.get_rhs_port2, cell.get_name, @name, j.get_name )
     2609            next
     2610          end
    25242611          dbgPrint( "set_port_reference_count: #{@name}.#{j.get_name} => #{cell.get_name}.#{port.get_name}\n")
    25252612          cell.port_referenced port
     
    29663053  #=== Cell#restrict を追加
    29673054  def add_restrict( entry_name, func_name, region_name_list )
    2968     if @restrict_list[ entry_name ] then
    2969       if @restrict_list[ entry_name ][ func_name ] then
    2970         @restrict_list[ entry_name ][ func_name ].each{ |rn|
    2971           if region_name_list.include? rn then
    2972             # p func_name
    2973             name = func_name ? entry_name : entry_name+"."+func_name
    2974             cdl_warning( "W9999 $1 restrict region duplicate $2", name, rn )
     3055    if @restrict_list[ entry_name ] == nil then
     3056      @restrict_list[ entry_name ] = {}
     3057      @restrict_list2[ entry_name ] = {}
     3058    end
     3059    if @restrict_list[ entry_name ][ func_name ] == nil then
     3060      @restrict_list[ entry_name ][ func_name ] = []
     3061      @restrict_list2[ entry_name ][ func_name ] = []
     3062    end
     3063    region_name_list.each { |rp|
     3064      @restrict_list[ entry_name ][ func_name ] << rp
     3065      # p "Class: " + rp.to_s
     3066      obj = Namespace.find rp
     3067      if ( obj.kind_of? Region ) then
     3068        @restrict_list2[ entry_name ][ func_name ] << obj.get_domain_root
     3069      else
     3070        cdl_error( "S9999 $1 not found or not region", rp.to_s )
     3071      end
     3072    }
     3073  end
     3074
     3075  #=== Cell#check_restrict_list
     3076  def check_restrict_list
     3077    # p "check_restrict_list"
     3078    @restrict_list.each{ |entry_name, func_hash|
     3079      func_hash.each{ |func_name, region_list|
     3080        region_list.each{ |rp|
     3081          obj = Namespace.find rp
     3082          if ( obj.kind_of? Region ) then
     3083            if obj.get_domain_root != @region.get_domain_root then
     3084            else
     3085              cdl_info( "I9999 $1: restrict calling domain to $2, which is same domain as the cell locates", @name, rp.to_s )
     3086              # restrict を同じドメインを指定してもよいこととする (HRP3)
     3087              # KernelDoamin 内のセルに対し、KernelDomain に restrict している場合、
     3088              # 無所属経由で結合されているが、KernelDomain から呼出すことを想定した許可
     3089            end
     3090          else
     3091            cdl_error( "S9999 $1 not region", rp.to_s )
     3092          end
     3093        }
     3094      }
     3095    }
     3096  end
     3097
     3098  #=== Cell#callable?
     3099  def callable?( callee_cell, entry_name, func_name )
     3100    # p "callable? #{@name}"
     3101    res = callee_cell.callable_from?( entry_name, func_name, self )
     3102    dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n"
     3103    return res
     3104  end
     3105
     3106  #=== Cell#callable_from? (private)
     3107  def callable_from?( entry_name, func_name, caller_cell )
     3108    @b_restrict_referenced = true
     3109    if @restrict_list.length == 0 then
     3110      return true
     3111    end
     3112
     3113    dr = caller_cell.get_region.get_domain_root
     3114    if @restrict_list[entry_name] then
     3115      if @restrict_list[entry_name][func_name] then
     3116        @restrict_list2[entry_name][func_name].each{ |region|
     3117          if dr == region then
     3118            return true
     3119          end
     3120        }
     3121      elsif @restrict_list[entry_name][nil] then
     3122        @restrict_list2[entry_name][nil].each{ |region|
     3123          if dr == region then
     3124            return true
    29753125          end
    29763126        }
    29773127      else
    2978         @restrict_list[ entry_name ][ func_name ] = region_name_list
    2979       end
    2980     else
    2981       func_list = { }
    2982       func_list[ func_name ] = region_name_list
    2983       @restrict_list[ entry_name ] = func_list
    2984     end
    2985     # pp @restrict_list
    2986   end
    2987 
    2988   #=== Cell#check_restrict_list
    2989   def check_restrict_list
    2990     @restrict_list.each{ |entry_name, func_hash|
    2991       func_hash.each{ |func_name, region_list|
    2992         region_list.each{ |rn|
    2993           obj = Namespace.find [ rn ]
    2994           if ( obj.kind_of? Region ) then
    2995             if obj.get_domain_root != @region.get_domain_root then
    2996             else
    2997               cdl_warning( "W9999 $1 in same domain", rn )
    2998             end
    2999           else
    3000             cdl_error( "S9999 $1 not region", region )
    3001           end
    3002         }
    3003       }
    3004     }
    3005   end
    3006 
    3007   #=== Cell#callable?
    3008   def callable?( callee_cell, entry_name, func_name )
    3009     res = callee_cell.callable_from?( entry_name, func_name, self )
    3010     dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n"
    3011     return res
    3012   end
    3013 
    3014   #=== Cell#callable_from? (private)
    3015   def callable_from?( entry_name, func_name, caller_cell )
    3016     if @restrict_list.length == 0 then
     3128        return false
     3129      end
     3130    else
     3131      return false
     3132    end
     3133  end
     3134
     3135  #=== Cell#get_callable_regions( entry_name, func_name )
     3136  # func_name=nil の場合、entry_name の可否をチェック数る
     3137  # nil が返る場合、制限されていないことを意味する
     3138  def get_restricted_regions( entry_name, func_name )
     3139    # p "get_restricted_regions #{@name}"
     3140    @b_restrict_referenced = true
     3141    if @restrict_list[entry_name] then
     3142      if @restrict_list[entry_name][func_name] then
     3143        return @restrict_list2[entry_name][func_name]
     3144      else
     3145        return @restrict_list2[entry_name][nil]
     3146      end
     3147    end
     3148    return nil
     3149  end
     3150
     3151  #=== Cell#has_ineffective_restrict_specifier
     3152  # restrict 指定子が指定されていて、参照されていない場合 true
     3153  # 参照は、HRPSVCPlugin のみ
     3154  def has_ineffective_restrict_specifier
     3155    if @restrict_list.length != 0 && @b_restrict_referenced == false then
    30173156      return true
    3018     end
    3019 
    3020     if @restrict_list[entry_name] then
    3021       if @restrict_list[entry_name][nil] &&
    3022          @restrict_list[entry_name][nil].include?( caller_cell.get_region.get_domain_root.get_name )then
    3023         return true
    3024       end
    3025       if @restrict_list[entry_name][func_name] &&
    3026          @restrict_list[entry_name][func_name].include?( caller_cell.get_region.get_domain_root.get_name )then
    3027         return true
    3028       else
    3029         return false
    3030       end
    3031     else
    3032       return true
    3033     end
    3034   end
    3035  
     3157    else
     3158      return false
     3159    end
     3160  end
     3161
    30363162  def show_tree( indent )
    30373163    indent.times { print "  " }
     
    37093835  end
    37103836
     3837  def get_global_name
     3838    @global_name
     3839  end
     3840
    37113841  def get_port_list
    37123842    @port_list
     
    37233853  def get_internal_allocator_list
    37243854    @internal_allocator_list
     3855  end
     3856
     3857  #== CompositeCelltype#get_real_celltype
     3858  # port_name に接続されている内部のセルタイプを得る
     3859  def get_real_celltype( port_name )
     3860    cj = find_export port_name
     3861    inner_celltype = cj.get_cell.get_celltype
     3862    if inner_celltype.instance_of? CompositeCelltype then
     3863      return inner_celltype.get_real_celltype
     3864    else
     3865      return inner_celltype
     3866    end
    37253867  end
    37263868
     
    39364078    else
    39374079      # entry port optimize
    3938       if $unopt then
     4080      if $unopt || $unopt_entry then
    39394081        # 最適化なし
    39404082        @b_VMT_useless = false                     # VMT 不要 (true の時 VMT を介することなく呼出す)
     
    42604402
    42614403  def is_VMT_useless?                     # VMT 関数テーブルを使用しない
    4262    @b_VMT_useless
     4404    if @port_type == :ENTRY && $unopt_entry == true then
     4405      # プラグインから $unopt_entry を設定するケースのため
     4406      # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる)
     4407      return false
     4408    else
     4409      return @b_VMT_useless
     4410    end
    42634411  end
    42644412
    42654413  def is_skelton_useless?                 # スケルトン関数不要   (true の時、受け口関数を呼出す)
    4266     @b_skelton_useless
     4414    if @port_type == :ENTRY && $unopt_entry == true then
     4415      # プラグインから $unopt_entry を設定するケースのため
     4416      # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる)
     4417      return false
     4418    else
     4419      return @b_skelton_useless
     4420    end
    42674421  end
    42684422
     
    48014955      if ! c.get_f_def then   # Namespace の @cell_list にはプロトタイプが含まれるケースあり
    48024956        if c.get_f_ref then
    4803           cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )
     4957          c.cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )
    48044958        elsif $verbose then
    4805           cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )
     4959          c.cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )
    48064960        end
    48074961      else
     
    48104964        # if c.get_f_ref == false && c.is_generate? && ct && ct.is_inactive? then
    48114965        if c.get_f_ref == false && ct && ct.is_inactive? then
    4812           cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str )
     4966          c.cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str )
     4967        end
     4968        if c.has_ineffective_restrict_specifier then
     4969          c.cdl_warning( "W9999: $1 has ineffective restrict specifier", c.get_namespace_path.get_path_str )
    48134970        end
    48144971      end
     
    50055162  end
    50065163
     5164  #== Namespace (Region) に属するセルのリスト
     5165  def get_cell_list
     5166    @cell_list
     5167  end
     5168
     5169  #== Namespace (Region)# 子リージョンのリスト
     5170  #
     5171  # リージョンは Namespace クラスで namespace として記憶されている
     5172  def get_region_list
     5173    @namespace_list
     5174  end
     5175 
    50075176  def show_tree( indent )
    50085177    indent.times { print "  " }
     
    56015770          next_cell_nsp       = @through_generated_list[ i + 1 ].get_cell_namespace_path
    56025771          next_port_name      = @through_generated_list[ i + 1 ].get_through_entry_port_name
     5772          next_port_subscript = @through_generated_list[ i + 1 ].get_through_entry_port_subscript
    56035773        rescue Exception => evar
    56045774          cdl_error( "S1124 $1: plugin function failed: \'get_through_entry_port_name\'" , plugin_name )
     
    56195789        next_cell      = @cell
    56205790        next_port_name = @port_name
     5791        next_port_subscript = @rhs_subscript
    56215792
    56225793        if next_cell == nil then
     
    56305801        # region から @cell_name.@port_name への through がないか探す
    56315802        # rp = @through_list[i][3].find_cell_port_through_plugin( @cell_name, @port_name ) #762
    5632         rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name )
     5803        rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript )
    56335804           # @through_list[i] と @region_through_list[i-cp_len] は同じ
    56345805        # 共用しないようにするには、見つからなかったことにすればよい
     
    56435814        plClass = load_plugin( plugin_name, ThroughPlugin )
    56445815        if( plClass ) then
    5645           gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, plClass )
     5816          gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass )
    56465817        end
    56475818      else
     
    56565827          # 生成したものを region(@through_list[i][3]) のリストに追加
    56575828          # @through_list[i][3].add_cell_port_through_plugin( @cell_name, @port_name, @through_generated_list[i] ) #762
    5658           @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @through_generated_list[i] )
     5829          @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript, @through_generated_list[i] )
    56595830        end
    56605831      end
     
    56905861
    56915862  #=== Join# through プラグインを呼び出して CDL 生成させるとともに、import する
    5692   def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, plClass )
     5863  def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass )
    56935864
    56945865    through = @through_list[ i ]
     
    57175888
    57185889    begin
    5719       plugin_object = plClass.new( "#{generating_cell_name}".to_sym, plugin_arg.to_s, next_cell, "#{next_port_name}".to_sym, @definition.get_signature, @celltype, caller_cell )
     5890      plugin_object = plClass.new( generating_cell_name.to_sym, plugin_arg.to_s,
     5891                                   next_cell, next_port_name.to_sym, next_port_subscript,
     5892                                   @definition.get_signature, @celltype, caller_cell )
    57205893      plugin_object.set_locale @locale
    57215894    rescue Exception => evar
     
    59126085  end
    59136086
    5914   def get_rhs_subscript
     6087  # 末尾数字1 : CDL で指定された、右辺のセルを返す
     6088  def get_rhs_cell1   # get_cell と同じ
     6089    @cell
     6090  end
     6091  def get_rhs_port1   # get_port_name 同じ
     6092    @port_name
     6093  end
     6094  def get_rhs_subscript1
    59156095    @rhs_subscript
    59166096  end
     
    59226102    # through 指定あり?
    59236103    if @through_list[0] then
    5924       # mikan through で生成したものが root namespace 限定
    59256104      # through で生成されたセルを探す
    5926 #      cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
    59276105      cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
    59286106      # cell のプラグインで生成されたポート名のポートを探す (composite なら内部の繋がるポート)
     
    59316109      # ポートを返す(composite なら内部の繋がるポートを返す)
    59326110      return @cell.get_real_port( @port_name )
     6111    end
     6112  end
     6113
     6114  #=== Join# 右辺の配列添数を得る
     6115  #    右辺が through の場合は挿入されたセルの添数
     6116  #    右辺が composite の場合は、内部の繋がるセルのポートの添数 (composite では変わらない)
     6117  #    このメソッドは get_rhs_cell,  と対になっている
     6118  def get_rhs_subscript
     6119    if @through_list[0] then
     6120      return @through_generated_list[0].get_through_entry_port_subscript
     6121    else
     6122      return @rhs_subscript
    59336123    end
    59346124  end
     
    65686758end
    65696759
    6570 #== Domain
     6760#== DomainType
    65716761#
    65726762# region の domain を記憶するクラス
     
    66076797      return if pluginClass == nil
    66086798      @plugin = pluginClass.new( @region, @name, @option )
     6799      @plugin.set_locale @locale
    66096800    end
    66106801  end
     
    66246815  end
    66256816
    6626   #== Domain リージョンの Hash を得る
     6817  #== DomainType リージョンの Hash を得る
    66276818  # @@domain_regions の説明参照
    66286819  def self.get_domain_regions
     
    66366827  def get_option
    66376828    @option
     6829  end
     6830
     6831  #== DomainType#ドメイン種別を得る
     6832  #return::Symbol :kernel, :user, :OutOfDomain
     6833  def get_kind
     6834    @plugin.get_kind
    66386835  end
    66396836
     
    66976894
    66986895    if @@domain_name then
     6896      dbgPrint "Region=#{name} domain_type=#{@@domain_name} option=#{@@domain_option}\n"
    66996897      domain_option = CDLString.remove_dquote @@domain_option.to_s
    67006898      @domain_type = DomainType.new( self, @@domain_name, domain_option )
     
    69457143  end
    69467144
     7145  #== Region# ルートリージョン
     7146  # ルートリージョンは、namespace のルートと同じインスタンス
     7147  def selfget_root
     7148    Namespace.get_root
     7149  end
     7150
    69477151  def next_in_through_count
    69487152    @in_through_count += 1
     
    69787182  #=== Region# through プラグインで、この region から cell_name.port_name へのプラグインオブジェクトを登録
    69797183  # mikan namesppace 対応 (cell_name)
    6980   def add_cell_port_through_plugin( cell_name, port_name, through_plugin_object )
    6981     @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ] = through_plugin_object
    6982   end
    6983 
    6984   def find_cell_port_through_plugin( cell_name, port_name )
    6985     return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ]
     7184  def add_cell_port_through_plugin( cell_name, port_name, subscript, through_plugin_object )
     7185    if subscript then
     7186      subscript = '[' + subscript.to_s + ']'
     7187    end
     7188    @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ] = through_plugin_object
     7189  end
     7190
     7191  def find_cell_port_through_plugin( cell_name, port_name, subscript )
     7192    if subscript then
     7193      subscript = '[' + subscript.to_s + ']'
     7194    end
     7195    return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ]
    69867196  end
    69877197
Note: See TracChangeset for help on using the changeset viewer.