Class: Babeltrace::CTF::StructDef

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

#field(i) ⇒ Object



323
324
325
# File 'lib/babeltrace/ctf/events.rb', line 323

def field(i)
  @definition.get_struct_field_index(i)
end

#field_countObject



319
320
321
# File 'lib/babeltrace/ctf/events.rb', line 319

def field_count
  @definition.get_struct_field_count
end

#valueObject



327
328
329
330
331
332
# File 'lib/babeltrace/ctf/events.rb', line 327

def value
  field_count.times.collect { |i|
    f = field(i)
    [f.name, f.value]
  }.to_h
end