Class: MailBox
- Inherits:
-
BaseElm
- Object
- AxiTdl::SdlModuleActiveBaseElm
- BaseElm
- MailBox
- Defined in:
- lib/tdl/elements/mail_box.rb
Instance Attribute Summary collapse
-
#ghost ⇒ Object
include AlwaysBlock include RedefOpertor.
Attributes inherited from BaseElm
Instance Method Summary collapse
-
#cond_block_proc(a, b = nil) ⇒ Object
redefine cond_block_proc.
- #get(baseelm) ⇒ Object
-
#initialize(name: 'mbox', depth: 100, belong_to_module: nil) ⇒ MailBox
constructor
A new instance of MailBox.
- #inst ⇒ Object
-
#put(baseelm) ⇒ Object
def _assign_small_and_eq(b) $tdl_cur_always_env.assign_proc(self,b) end.
- #signal ⇒ Object
- #to_s ⇒ Object
Methods inherited from BaseElm
#matrix, #name_copy, #path_refs, recfg_nc, #s
Methods included from TdlSpace::ExCreateTP
Methods included from AxiTdl::TestUnitTrack
Constructor Details
#initialize(name: 'mbox', depth: 100, belong_to_module: nil) ⇒ MailBox
Returns a new instance of MailBox.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tdl/elements/mail_box.rb', line 7 def initialize(name:'mbox',depth:100, belong_to_module: nil ) @name = name @depth = depth @belong_to_module = belong_to_module unless @belong_to_module raise TdlError.new("Clock<#{name}> dnot have belong_to_module") end end |
Instance Attribute Details
#ghost ⇒ Object
include AlwaysBlock include RedefOpertor
6 7 8 |
# File 'lib/tdl/elements/mail_box.rb', line 6 def ghost @ghost end |
Instance Method Details
#cond_block_proc(a, b = nil) ⇒ Object
redefine cond_block_proc
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/tdl/elements/mail_box.rb', line 48 def cond_block_proc(a,b=nil) unless a.eql? self super(a,b) else if(b.is_a? Hash) if b[:cond_type].eql? :if_exp exp_element(b[:cond_value]) end elsif b.nil? rel = exp_element(a) if rel =~ /\s+end\s*$/ rel else rel.concat(";") end else exp_element(a).concat(".put(").concat(exp_element(b)).concat(");") end end end |
#get(baseelm) ⇒ Object
41 42 43 44 45 |
# File 'lib/tdl/elements/mail_box.rb', line 41 def get(baseelm) b = "#{signal}.get(#{exp_element(baseelm)})" $__curr_logic_for_expect.last.assign_proc(nil,b) return nil end |
#inst ⇒ Object
27 28 29 |
# File 'lib/tdl/elements/mail_box.rb', line 27 def inst "mailbox #{@name} = new(#{@depth});\n" end |
#put(baseelm) ⇒ Object
def _assign_small_and_eq(b)
$__tdl_cur_always_env__.assign_proc(self,b)
end
35 36 37 38 39 |
# File 'lib/tdl/elements/mail_box.rb', line 35 def put(baseelm) b = "#{signal}.put(#{exp_element(baseelm)})" $__curr_logic_for_expect.last.assign_proc(nil,b) return nil end |
#signal ⇒ Object
19 20 21 |
# File 'lib/tdl/elements/mail_box.rb', line 19 def signal "#{@name}" end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/tdl/elements/mail_box.rb', line 23 def to_s signal end |