Class: BDNode
Overview
双方向 Node (Bi Direction Node)
Node の子クラス owner Node から参照されているもの (owner へのリンクも取り出せる)
get_owner で得られるもの FuncHead => Signature Decl => Namespace(const), Typedef(typedef), Celltype, CompositeCelltype(attr,var) Struct(member), ParamDecl(parameter), FuncHead(funchead) Signature, Celltype, CompositeCelltype, Typedef => Namespace , Namespace => Namespace, Generator.class (root Namespace の場合) Cell => Region, CompositeCelltype(in_composite) Port => Celltype, Composite Factory => Celltype Join => Cell CompositeCelltypeJoin => CompositeCelltype Region => Region, ParamDecl => ParamList ParamList => FuncHead Expression => Namespace 大半のものは new_* メソッドで owner Node に伝達される そのメソッドが呼び出されたときに owner Node が記録される new_* がないもの: Decl(parameter), ParamDecl, ParamList, FuncHead, Expression
Expression は、owner Node となるものが多くあるが、改造が困難であるため
Expression が定義されたときの Namespace を owner Node とする
StructType は Type の一種なので owner を持たない
Direct Known Subclasses
CompositeCelltypeJoin, Decl, Factory, FuncHead, Join, NSBDNode, ParamDecl, ParamList, Port, ReverseJoin, Typedef
Instance Method Summary collapse
-
#get_owner ⇒ Object
owner を得る class の説明を参照.
-
#initialize ⇒ BDNode
constructor
@import::Import :.
-
#set_owner(owner) ⇒ Object
owner を設定する.
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 ⇒ BDNode
@import::Import :
145 146 147 148 149 150 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 145 def initialize super @owner = nil @NamespacePath = nil @import = Import.get_current end |
Instance Method Details
#get_owner ⇒ Object
owner を得る
class の説明を参照
160 161 162 163 164 165 |
# File 'lib/tecsgen/core/syntaxobj.rb', line 160 def get_owner if @owner.nil? raise "Node have no owner #{self.class.name} #{get_name}" end @owner end |