Class: Babeltrace::CTF::ArrayDef

Inherits:
Definition show all
Defined in:
lib/babeltrace/ctf/events.rb

Instance Attribute Summary

Attributes inherited from Definition

#definition

Instance Method Summary collapse

Methods inherited from Definition

create, #decl, #initialize, #name

Constructor Details

This class inherits a constructor from Babeltrace::CTF::Definition

Instance Method Details

#index(i) ⇒ Object



382
383
384
385
# File 'lib/babeltrace/ctf/events.rb', line 382

def index(i)
  d = CTF.bt_array_index(@definition, i)
  return Definition.create(d)
end

#lenObject



378
379
380
# File 'lib/babeltrace/ctf/events.rb', line 378

def len
  @definition.decl.len
end

#valueObject



387
388
389
# File 'lib/babeltrace/ctf/events.rb', line 387

def value
  len.times.collect { |i| index(i).value }
end