Class: Babeltrace::CTF::Internal::EventDecl

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/babeltrace/ctf/events.rb

Instance Method Summary collapse

Instance Method Details

#get_decl_fields(scope) ⇒ Object Also known as: decl_fields



174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/babeltrace/ctf/events.rb', line 174

def get_decl_fields(scope)
  count = FFI::MemoryPointer::new(:uint)
  list = FFI::MemoryPointer::new(:pointer)
  res = CTF.bt_ctf_get_decl_fields(self, scope, list, count)
  count = count.read(:uint)
  if count > 0
    list = list.read_pointer.read_array_of_pointer(count)
    list.collect { |p| FieldDecl::new(p) }
  else
    []
  end
end

#get_nameObject Also known as: name



169
170
171
# File 'lib/babeltrace/ctf/events.rb', line 169

def get_name
  CTF.bt_ctf_get_decl_event_name(self)
end