class Babeltrace2::BTComponent

Constants

ClassType
DescriptorSetAddDescriptorStatus

Public Class Methods

from_handle(handle, retain: true, auto_release: true) click to toggle source
# File lib/babeltrace2/graph/component.rb, line 32
def self.from_handle(handle, retain: true, auto_release: true)
  case Babeltrace2.bt_component_get_class_type(handle)
  when :BT_COMPONENT_CLASS_TYPE_SOURCE
    handle = BTComponentSourceHandle.new(handle)
    BTComponentSource
  when :BT_COMPONENT_CLASS_TYPE_FILTER
    handle = BTComponentFilterHandle.new(handle)
    BTComponentFilter
  when :BT_COMPONENT_CLASS_TYPE_SINK
    handle = BTComponentSinkHandle.new(handle)
    BTComponentSink
  else
    raise Error.new("unknown component class type")
  end.new(handle, retain: retain, auto_release: auto_release)
end

Public Instance Methods

class_type()
Alias for: get_class_type
filter?()
Alias for: is_filter
get_class() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 68
def get_class
  handle = Babeltrace2.bt_component_borrow_class_const(@handle)
  BTComponentClass.from_handle(handle)
end
get_class_type() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 48
def get_class_type
  Babeltrace2.bt_component_get_class_type(@handle)
end
Also aliased as: class_type
get_logging_level() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 78
def get_logging_level
  Babeltrace2.bt_component_get_logging_level(@handle)
end
Also aliased as: logging_level
get_name() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 73
def get_name
  Babeltrace2.bt_component_get_name(@handle)
end
Also aliased as: name
is_filter() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 58
def is_filter
  get_class_type == :BT_COMPONENT_CLASS_TYPE_FILTER
end
Also aliased as: filter?
is_sink() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 63
def is_sink
  get_class_type == :BT_COMPONENT_CLASS_TYPE_SINK
end
Also aliased as: sink?
is_source() click to toggle source
# File lib/babeltrace2/graph/component.rb, line 53
def is_source
  get_class_type == :BT_COMPONENT_CLASS_TYPE_SOURCE
end
Also aliased as: source?
logging_level()
Alias for: get_logging_level
name()
Alias for: get_name
sink?()
Alias for: is_sink
source?()
Alias for: is_source