Class: Crokus::CFG
- Inherits:
-
Object
- Object
- Crokus::CFG
- Defined in:
- lib/crokus/cfg.rb
Instance Attribute Summary collapse
-
#bbs ⇒ Object
Returns the value of attribute bbs.
-
#infos ⇒ Object
Returns the value of attribute infos.
-
#name ⇒ Object
Returns the value of attribute name.
-
#starter ⇒ Object
Returns the value of attribute starter.
Instance Method Summary collapse
- #<<(bb) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(name) ⇒ CFG
constructor
A new instance of CFG.
- #print(versbose = false) ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(name) ⇒ CFG
Returns a new instance of CFG.
19 20 21 22 23 24 |
# File 'lib/crokus/cfg.rb', line 19 def initialize name @name=name @bbs=[] @infos={} @bbs << @starter=BasicBlock.new end |
Instance Attribute Details
#bbs ⇒ Object
Returns the value of attribute bbs.
17 18 19 |
# File 'lib/crokus/cfg.rb', line 17 def bbs @bbs end |
#infos ⇒ Object
Returns the value of attribute infos.
18 19 20 |
# File 'lib/crokus/cfg.rb', line 18 def infos @infos end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/crokus/cfg.rb', line 17 def name @name end |
#starter ⇒ Object
Returns the value of attribute starter.
17 18 19 |
# File 'lib/crokus/cfg.rb', line 17 def starter @starter end |
Instance Method Details
#<<(bb) ⇒ Object
34 35 36 |
# File 'lib/crokus/cfg.rb', line 34 def <<(bb) @bbs << bb end |
#each(&block) ⇒ Object
26 27 28 |
# File 'lib/crokus/cfg.rb', line 26 def each &block @bbs.each &block end |
#print(versbose = false) ⇒ Object
38 39 40 |
# File 'lib/crokus/cfg.rb', line 38 def print versbose=false CFGPrinter.new.print(self,5) end |
#size ⇒ Object
30 31 32 |
# File 'lib/crokus/cfg.rb', line 30 def size @bbs.size end |