Class: NSBDNode
Overview
Namespace 名を持つ BDNode
Namespace(Region), Signature, Celltype, CompositeCelltype, Cell
Direct Known Subclasses
Instance Method Summary collapse
-
#get_namespace ⇒ Object
属する namespace を得る owner を namespace にたどり着くまで上にたどる.
-
#get_namespace_path ⇒ Object
NamespacePath を得る.
-
#initialize ⇒ NSBDNode
constructor
A new instance of NSBDNode.
- #is_imported? ⇒ Boolean
- #set_namespace_path ⇒ Object
Methods inherited from BDNode
Methods inherited from Node
#cdl_error, #cdl_error2, #cdl_error3, #cdl_info, #cdl_info2, #cdl_warning, #cdl_warning2, #get_locale, #locale_str, #set_locale
Constructor Details
#initialize ⇒ NSBDNode
Returns a new instance of NSBDNode.
171 172 173 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 171 def initialize super end |
Instance Method Details
#get_namespace ⇒ Object
属する namespace を得る
owner を namespace にたどり着くまで上にたどる
177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 177 def get_namespace if @owner.is_a? Namespace return @owner elsif !@owner.nil? return @owner.get_namespace else # @owner == nil なら "::" if @name != "::" raise "non-root namespace has no owner #{self.class.name}##{@name} #{self}" end return nil end end |
#get_namespace_path ⇒ Object
NamespacePath を得る
201 202 203 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 201 def get_namespace_path return @NamespacePath end |
#is_imported? ⇒ Boolean
205 206 207 208 209 210 211 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 205 def is_imported? if @import return @import.is_imported? else return false # mikan: 仮 @import が nil になるケースが追求できていない end end |
#set_namespace_path ⇒ Object
191 192 193 194 195 196 197 198 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 191 def set_namespace_path ns = get_namespace if ns @NamespacePath = ns.get_namespace_path.append(get_name) else raise "get_namespace_path: no namespace found" end end |