Class: Babeltrace::CTF::StructDef
Instance Attribute Summary
Attributes inherited from Definition
#definition
Instance Method Summary
collapse
Methods inherited from Definition
create, #decl, #initialize, #name
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_count ⇒ Object
319
320
321
|
# File 'lib/babeltrace/ctf/events.rb', line 319
def field_count
@definition.get_struct_field_count
end
|
#value ⇒ Object
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
|