Method: HDLRuby::Viz::Node#initialize
- Defined in:
- lib/HDLRuby/hruby_viz.rb
#initialize(type, parent = nil, name = nil) ⇒ Node
Returns a new instance of Node.
3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 |
# File 'lib/HDLRuby/hruby_viz.rb', line 3057 def initialize(type, parent = nil, name = nil) @type = type.to_sym if name then @name = name.to_s else @name = HDLRuby.uniq_name("node").to_s end @parent = parent @parent.branches << self if @parent @successor = nil @branches = [] @xpos = 0 @ypos = 0 @width = 10 # Width in number of IC routes @height = 2 # Height in number of IC routes @arrows = [] # The flow arrows (routes) @scale = 1.0 # The scale for SVG generation end |