[388] | 1 | # coding: utf-8
|
---|
| 2 | #
|
---|
| 3 | # TECS Generator
|
---|
| 4 | # Generator for TOPPERS Embedded Component System
|
---|
| 5 | #
|
---|
| 6 | # Copyright (C) 2008-2018 by TOPPERS Project
|
---|
| 7 | #--
|
---|
| 8 | # ä¸è¨èä½æ¨©è
|
---|
| 9 | ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
| 10 | # ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
| 11 | # å¤ã»åé
|
---|
| 12 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
| 13 | # (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
| 14 | # 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
| 15 | # ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
| 16 | # (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 17 | # ç¨ã§ããå½¢ã§åé
|
---|
| 18 | å¸ããå ´åã«ã¯ï¼åé
|
---|
| 19 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
| 20 | # è
|
---|
| 21 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
| 22 | # ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 23 | # (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 24 | # ç¨ã§ããªãå½¢ã§åé
|
---|
| 25 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
| 26 | # ã¨ï¼
|
---|
| 27 | # (a) åé
|
---|
| 28 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
| 29 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
| 30 | # ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 31 | # (b) åé
|
---|
| 32 | å¸ã®å½¢æ
|
---|
| 33 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
| 34 | # å ±åãããã¨ï¼
|
---|
| 35 | # (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
| 36 | # 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 37 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
| 38 | 責ãããã¨ï¼
|
---|
| 39 | # ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
| 40 | # ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 41 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
| 42 | # å
|
---|
| 43 | 責ãããã¨ï¼
|
---|
| 44 | #
|
---|
| 45 | # æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
| 46 | ã
|
---|
| 47 | # ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
| 48 | # ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
| 49 | # ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
| 50 | # ã®è²¬ä»»ãè² ããªãï¼
|
---|
| 51 | #
|
---|
| 52 | #
|
---|
| 53 | # $Id$
|
---|
| 54 | #++
|
---|
| 55 |
|
---|
| 56 | #== celltype ãã©ã°ã¤ã³ã®å
|
---|
| 57 | ±éã®è¦ªã¯ã©ã¹
|
---|
| 58 | class HRPKernelObjectPlugin < CelltypePlugin
|
---|
| 59 | # @@obj_hash = {}
|
---|
| 60 |
|
---|
| 61 | #@celltype:: Celltype
|
---|
| 62 | #@option:: String :ãªãã·ã§ã³æåå
|
---|
| 63 | def initialize( celltype, option )
|
---|
| 64 | super
|
---|
| 65 | #
|
---|
| 66 | # ããããã®ã«ã¼ãã«ãªãã¸ã§ã¯ãã解æ対象ã»ã«ã¿ã¤ãã«è¿½å
|
---|
| 67 | # ç®çï¼
|
---|
| 68 | # - ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã»ã«ãã¡ã¢ãªä¿è·å¯¾è±¡å¤ã¨ãã
|
---|
| 69 | # - ã«ã¼ãã«ãªãã¸ã§ã¯ãæ¬ä½ã®ç®¡çã¯TECSã§ãªãOSã§å®æ½ãããã
|
---|
| 70 | # - ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã»ã«ã¸ã®ã¢ã¯ã»ã¹ãç´æ¥é¢æ°å¼åºã
|
---|
| 71 | # ãã¨ãã
|
---|
| 72 | # - ã·ã¹ãã ãµã¼ãã¹å¼åºãã¯OSãæä¾ãããã
|
---|
| 73 | HRPKernelObjectPlugin.set_celltype(celltype)
|
---|
| 74 | end
|
---|
| 75 |
|
---|
| 76 | #=== HRPKernelObjectPlugin#print_cfg_cre
|
---|
| 77 | # å種ã«ã¼ãã«ãªãã¸ã§ã¯ãã®CRE_*ã®åºå
|
---|
| 78 | # file:: FILE: åºåå
|
---|
| 79 | ãã¡ã¤ã«
|
---|
| 80 | # val :: string: ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
|
---|
| 81 | # tab :: string: ã¤ã³ãã³ãç¨ã®tab
|
---|
| 82 | def print_cfg_cre(file, cell, val, tab)
|
---|
| 83 | raise "called virtual method print_cfg_cre in #{@celltype.get_name} plugin"
|
---|
| 84 | end
|
---|
| 85 |
|
---|
| 86 | #=== HRPKernelObjectPlugin#print_cfg_sac
|
---|
| 87 | # å種ã«ã¼ãã«ãªãã¸ã§ã¯ãã®SAC_*ã®åºå
|
---|
| 88 | # file:: FILE: åºåå
|
---|
| 89 | ãã¡ã¤ã«
|
---|
| 90 | # val :: string: ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
|
---|
| 91 | # acv :: string: ã¢ã¯ã»ã¹ãã¯ã¿
|
---|
| 92 | def print_cfg_sac(file, val, acv)
|
---|
| 93 | raise "called virtual method print_cfg_sac in #{@celltype.get_name} plugin"
|
---|
| 94 | end
|
---|
| 95 |
|
---|
| 96 | #
|
---|
| 97 | # ã»ã«ã¿ã¤ããã©ã°ã¤ã³ã®æ¬ä½ã¡ã½ãã
|
---|
| 98 | # - éçAPIã®çæ
|
---|
| 99 | # file:: FILE: åºåå
|
---|
| 100 | ãã¡ã¤ã«
|
---|
| 101 | #
|
---|
| 102 | def gen_factory file
|
---|
| 103 | dbgPrint "===== begin #{@celltype.get_name.to_s} plugin =====\n"
|
---|
| 104 |
|
---|
| 105 | #
|
---|
| 106 | # 対象ã¨ãªããã¹ã¦ã®ã»ã«ã«ã¤ãã¦ãåãå£ã«çµåããã¦ãã
|
---|
| 107 | # ã»ã«ã®æå±ãã¡ã¤ã³ã解æ
|
---|
| 108 | # - çæãã¹ãcfgãã¡ã¤ã«åãåå¾ããããã«å¿
|
---|
| 109 | è¦
|
---|
| 110 | #
|
---|
| 111 | if !HRPKernelObjectPlugin.isChecked()
|
---|
| 112 | HRPKernelObjectPlugin.check_referenced_cells()
|
---|
| 113 | else
|
---|
| 114 | dbgPrint "***** already checked\n"
|
---|
| 115 | end
|
---|
| 116 |
|
---|
| 117 | # 追è¨ããããã« AppFile ã使ãï¼æåã³ã¼ãå¤æãããªãï¼
|
---|
| 118 | file2 = AppFile.open( "#{$gen}/tecsgen.cfg" )
|
---|
| 119 | file2.print "\n/* Generated by #{self.class.name} */\n\n"
|
---|
| 120 |
|
---|
| 121 | @celltype.get_cell_list.each { |cell|
|
---|
| 122 | if cell.is_generate?
|
---|
| 123 | dbgPrint "===== begin check my domain #{cell.get_name} =====\n"
|
---|
| 124 | #
|
---|
| 125 | # ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ãï¼valã«ã³ãã¼
|
---|
| 126 | #
|
---|
| 127 | val = {}
|
---|
| 128 | @celltype.get_attribute_list.each{ |a|
|
---|
| 129 | # p a.get_name
|
---|
| 130 | if a.get_type.kind_of?( ArrayType )
|
---|
| 131 | val[a.get_name] = []
|
---|
| 132 | if j = cell.get_join_list.get_item(a.get_name)
|
---|
| 133 | # ã»ã«çææã«åæåããå ´å
|
---|
| 134 | j.get_rhs.each { |elem|
|
---|
| 135 | val[a.get_name] << elem.to_s
|
---|
| 136 | }
|
---|
| 137 | elsif i = a.get_initializer
|
---|
| 138 | # ã»ã«ã¿ã¤ãã®åæåå¤ã使ãå ´å
|
---|
| 139 | i.each { |elem|
|
---|
| 140 | val[a.get_name] << elem.to_s
|
---|
| 141 | }
|
---|
| 142 | else
|
---|
| 143 | raise "attribute is not initialized"
|
---|
| 144 | end
|
---|
| 145 | else
|
---|
| 146 | if j = cell.get_join_list.get_item(a.get_name)
|
---|
| 147 | # ã»ã«çææã«åæåããå ´å
|
---|
| 148 | val[a.get_name] = j.get_rhs.to_s
|
---|
| 149 | elsif i = a.get_initializer
|
---|
| 150 | # ã»ã«ã¿ã¤ãã®åæåå¤ã使ãå ´å
|
---|
| 151 | val[a.get_name] = i.to_s
|
---|
| 152 | else
|
---|
| 153 | raise "attribute is not initialized"
|
---|
| 154 | end
|
---|
| 155 | end
|
---|
| 156 | }
|
---|
| 157 | # generate.rbãåèã«
|
---|
| 158 | # $id$ãç½®æ
|
---|
| 159 | if val[:id].nil? != true
|
---|
| 160 | name_array = @celltype.get_name_array( cell )
|
---|
| 161 | val[:id] = @celltype.subst_name( val[:id], name_array )
|
---|
| 162 | end
|
---|
| 163 | # $cbp$ã®ä»£ãã
|
---|
| 164 | cell_domain_root = cell.get_region.get_domain_root
|
---|
| 165 | cell_domain_type = cell.get_region.get_domain_root.get_domain_type
|
---|
| 166 |
|
---|
| 167 | # CRE_XXX/DEF_XXXã®çæ
|
---|
| 168 | if cell_domain_type.get_option.to_s != "OutOfDomain"
|
---|
| 169 | # ä¿è·ãã¡ã¤ã³ã«å±ããå ´å
|
---|
| 170 | if !HRPKernelObjectPlugin.include_region(cell_domain_root.get_name.to_s)
|
---|
| 171 | # ãã®ä¿è·ãã¡ã¤ã³ã®.cfgãçæããã¦ããªãå ´å
|
---|
| 172 | HRPKernelObjectPlugin.set_region_list(cell_domain_root.get_name.to_s)
|
---|
| 173 | dbgPrint "~~~~~ #{cell_domain_root.get_name.to_s} is registered!\n"
|
---|
| 174 |
|
---|
| 175 | # # if cell.get_region.get_param == :KERNEL_DOMAIN
|
---|
| 176 | # if cell_domain_type.get_option.to_s == "kernel"
|
---|
| 177 | # file2.print "KERNEL_DOMAIN{\n"
|
---|
| 178 | # else
|
---|
| 179 | # file2.print "DOMAIN(#{cell_domain_root.get_name.to_s}){\n"
|
---|
| 180 | # end
|
---|
| 181 | # file2.puts "\tINCLUDE(\"#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg\");"
|
---|
| 182 | # file2.puts "}\n"
|
---|
| 183 | else
|
---|
| 184 | dbgPrint "~~~~~ #{cell.get_region.get_namespace_path} is included in"
|
---|
| 185 | #p @@region_list
|
---|
| 186 | end
|
---|
| 187 | file3 = AppFile.open( "#{$gen}/tecsgen_#{cell_domain_root.get_global_name}.cfg" )
|
---|
| 188 | print_cfg_cre(file3, cell, val,"")
|
---|
| 189 | file3.close
|
---|
| 190 | else
|
---|
| 191 | # ç¡æå±ã®å ´å
|
---|
| 192 | dbgPrint "~~~~~ #{cell_domain_root.get_namespace_path} is OutOfDomain\n"
|
---|
| 193 | # print "~~~~~ #{cell_domain_root.get_namespace_path} is OutOfDomain\n"
|
---|
| 194 | # p cell_domain_root.get_name
|
---|
| 195 | if cell_domain_root.get_name == "::" then
|
---|
| 196 | print_cfg_cre(file2, cell, val, "")
|
---|
| 197 | else
|
---|
| 198 | # if !HRPKernelObjectPlugin.include_region(cell_domain_root.get_name.to_s)
|
---|
| 199 | # # ãã®ä¿è·ãã¡ã¤ã³ã®.cfgãçæããã¦ããªãå ´å
|
---|
| 200 | # HRPKernelObjectPlugin.set_region_list(cell_domain_root.get_name.to_s)
|
---|
| 201 | # file2.puts "INCLUDE(\"#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg\");\n"
|
---|
| 202 | # end
|
---|
| 203 | file3 = AppFile.open( "#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg" )
|
---|
| 204 | print_cfg_cre(file3, cell, val,"")
|
---|
| 205 | file3.close
|
---|
| 206 | end
|
---|
| 207 |
|
---|
| 208 | end
|
---|
| 209 |
|
---|
| 210 | dbgPrint "===== end check my domain #{cell.get_name} =====\n"
|
---|
| 211 |
|
---|
| 212 | #
|
---|
| 213 | # SAC_XXXã®çæ
|
---|
| 214 | #
|
---|
| 215 | if !val[:accessPattern1].nil?
|
---|
| 216 | dbgPrint "===== begin check regions #{cell.get_name} =====\n"
|
---|
| 217 | i = 0
|
---|
| 218 | acv = { \
|
---|
| 219 | :accessPattern1 => val[:accessPattern1], \
|
---|
| 220 | :accessPattern2 => val[:accessPattern2], \
|
---|
| 221 | :accessPattern3 => val[:accessPattern3], \
|
---|
| 222 | :accessPattern4 => val[:accessPattern4] \
|
---|
| 223 | }
|
---|
| 224 | acv_tmp = []
|
---|
| 225 | domain_roots = HRPPlugin.get_inter_domain_join_roots cell
|
---|
| 226 | # çµåå
|
---|
| 227 | ã»ã«ã®ãã¡ã¤ã³ãå ãã
|
---|
| 228 | if cell_domain_type.get_kind != :OutOfDomain then
|
---|
| 229 | domain_roots << cell_domain_root
|
---|
| 230 | end
|
---|
| 231 | domain_roots.each{ |dr|
|
---|
| 232 | case dr.get_domain_type.get_kind
|
---|
| 233 | when :user
|
---|
| 234 | acv_tmp << "TACP(#{dr.get_name})"
|
---|
| 235 | when :kernel
|
---|
| 236 | acv_tmp << "TACP_KERNEL"
|
---|
| 237 | when :OutOfDomain
|
---|
| 238 | if cell_domain_type.get_kind == :OutOfDomain then
|
---|
| 239 | # å¼ã³å
|
---|
| 240 | ããå¼ã³å
|
---|
| 241 | ã OutOfDomain ã®å ´å
|
---|
| 242 | acv_tmp << "TACP_SHARED"
|
---|
| 243 | end
|
---|
| 244 | end
|
---|
| 245 | }
|
---|
| 246 | acv_tmp.uniq!
|
---|
| 247 | if acv_tmp.length == 0 then
|
---|
| 248 | # å¼ã³å
|
---|
| 249 | ã»ã«ãç¡æå±ãã¤ãå¼ã³å
|
---|
| 250 | ãç¡æå±ã®ã¿ãã¾ãã¯çµåç¡ãã®å ´å
|
---|
| 251 | acv_tmp = [ "TACP_SHARED" ]
|
---|
| 252 | end
|
---|
| 253 | b_info = false
|
---|
| 254 | b_warn = false
|
---|
| 255 | acv.each { |key, acp|
|
---|
| 256 | if !acp.nil?
|
---|
| 257 | if acp != "OMIT"
|
---|
| 258 | elsif cell_domain_type.get_kind != :OutOfDomain
|
---|
| 259 | # p "UserDomainCell or KernelDomainCell"
|
---|
| 260 | domain_roots = HRPPlugin.get_inter_domain_join_roots cell
|
---|
| 261 | domain_roots.each{ |dr|
|
---|
| 262 | #
|
---|
| 263 | case dr.get_domain_type.get_kind
|
---|
| 264 | when :kernel
|
---|
| 265 | when :user
|
---|
| 266 | if dr.get_namespace_path != cell.get_region.get_domain_root.get_namespace_path
|
---|
| 267 | # ä»ã®ã¦ã¼ã¶ã¼ãã¡ã¤ã³ããã®çµå
|
---|
| 268 | if( b_warn == false ) then
|
---|
| 269 | cdl_error( "HRP9999 '$1': kernel object joined from other user domain. kernel object joined from multi-user-domain must be placed out of domain", cell.get_name )
|
---|
| 270 | b_warn = true
|
---|
| 271 | end
|
---|
| 272 | end
|
---|
| 273 | when :OutOfDomain
|
---|
| 274 | if( b_info == false ) then
|
---|
| 275 | # ç¡æå±ããã®çµå
|
---|
| 276 | # cdl_error( "HRP9999 kernel object joined from out of domain" )
|
---|
| 277 | if cell_domain_type.get_kind == :OutOfDomain
|
---|
| 278 | # ãã®æ
|
---|
| 279 | å ±ã¯ãä¸è¦ã¨å¤æãã (ç¡æå±ããç¡æå±ã¸çµåãããã¨ãã¢ã¯ã»ã¹è¨±å¯ãã¯ã¿ãè¨å®ãããªã)
|
---|
| 280 | # cdl_info2( cell.get_locale, "HRP9999 '$1': kernel object joined from out of domain, access vector is not set", cell.get_name )
|
---|
| 281 | b_info = true
|
---|
| 282 | end
|
---|
| 283 | end
|
---|
| 284 | else
|
---|
| 285 | raise "unknown domain kind"
|
---|
| 286 | end
|
---|
| 287 | }
|
---|
| 288 | # acv[key] = "TACP(#{cell_domain_root.get_name.to_s})"
|
---|
| 289 | else
|
---|
| 290 | # p "OutOfDomainCell"
|
---|
| 291 | # ç¡æå±ã®ã»ã«
|
---|
| 292 | # çµåå
|
---|
| 293 | ãã¡ã¤ã³ã«è¨±å¯ãã
|
---|
| 294 | # çµåå
|
---|
| 295 | ã«ç¡æå±ã®ã»ã«ãããã¨ãTACP_SHARED ãè¨å®ããã. ããã¼è§£æãã¦ãã¡ã¤ã³ãç¹å®ã§ããã®ããããã¹ãä»æ§
|
---|
| 296 | end
|
---|
| 297 | if acp == "OMIT"
|
---|
| 298 | acv[key] = acv_tmp.join( '|' )
|
---|
| 299 | end
|
---|
| 300 | end
|
---|
| 301 | }
|
---|
| 302 | #å種SACã®çæ
|
---|
| 303 | domainOption = cell_domain_type.get_option
|
---|
| 304 | # p "domain_root ", cell.get_region.get_domain_root.get_name
|
---|
| 305 | if domainOption != "OutOfDomain" || cell.get_region.get_domain_root.get_name != "::"
|
---|
| 306 | # ä¿è·ãã¡ã¤ã³ã«å±ããå ´å
|
---|
| 307 | file3 = AppFile.open( "#{$gen}/tecsgen_#{cell.get_region.get_name.to_s}.cfg" )
|
---|
| 308 | print_cfg_sac(file3, val, acv)
|
---|
| 309 | file3.close
|
---|
| 310 | else
|
---|
| 311 | # ç¡æå±ã®å ´å
|
---|
| 312 | print_cfg_sac(file2, val, acv)
|
---|
| 313 | end
|
---|
| 314 |
|
---|
| 315 | dbgPrint "===== end check regions #{cell.get_name} =====\n"
|
---|
| 316 | end
|
---|
| 317 | end
|
---|
| 318 | }
|
---|
| 319 | dbgPrint "===== end #{@celltype.get_name.to_s} plugin =====\n"
|
---|
| 320 | file2.close
|
---|
| 321 | end
|
---|
| 322 |
|
---|
| 323 | # ã«ã¼ãã«ãªãã¸ã§ã¯ãã»ã«ã¿ã¤ãã®ç®¡ç
|
---|
| 324 | # HRPKernelObjectPluginã¯ã©ã¹ã«å¯¾ãã¦ã¡ã½ããå¼åºããè¡ããã¨ãæ³å®
|
---|
| 325 | @@checked = false
|
---|
| 326 | @@celltype_list = []
|
---|
| 327 | @@region_list = []
|
---|
| 328 |
|
---|
| 329 | def self.isChecked()
|
---|
| 330 | return @@checked
|
---|
| 331 | end
|
---|
| 332 |
|
---|
| 333 | def self.check_referenced_cells()
|
---|
| 334 | dbgPrint "===== begin check registered celltype =====\n"
|
---|
| 335 | self.get_celltype_list.each { |ct|
|
---|
| 336 | dbgPrint( ct.get_name.to_s + "\n" )
|
---|
| 337 | }
|
---|
| 338 | dbgPrint "===== end check registered celltype =====\n"
|
---|
| 339 |
|
---|
| 340 | @@checked = true
|
---|
| 341 | end
|
---|
| 342 |
|
---|
| 343 | def self.set_celltype( celltype )
|
---|
| 344 | @@celltype_list << celltype
|
---|
| 345 | end
|
---|
| 346 |
|
---|
| 347 | def self.get_celltype_list
|
---|
| 348 | return @@celltype_list
|
---|
| 349 | end
|
---|
| 350 |
|
---|
| 351 | def self.set_region_list( region )
|
---|
| 352 | @@region_list << region
|
---|
| 353 | end
|
---|
| 354 |
|
---|
| 355 | def self.include_region( region )
|
---|
| 356 | return @@region_list.include?(region)
|
---|
| 357 | end
|
---|
| 358 |
|
---|
| 359 | def self.include_celltype?( celltype )
|
---|
| 360 | return @@celltype_list.include?(celltype)
|
---|
| 361 | end
|
---|
| 362 |
|
---|
| 363 | end
|
---|
| 364 |
|
---|