Class: Babeltrace2::BTComponentClass::Filter
Constant Summary
GetSupportedMipVersionsMethodStatus, PortConnectedMethodStatus, QueryMethodStatus, SetDescriptionStatus, SetHelpStatus, SetMethodStatus, SinkConsumeMethodStatus, SinkGraphIsConfiguredMethodStatus, Type
Instance Attribute Summary
#handle
Instance Method Summary
collapse
#description=, #finalize_method=, from_handle, #get_description, #get_help, #get_name, #get_supported_mip_versions_method=, #get_type, #help=, #initialize_method=, #is_filter, #is_sink, #is_source, #query_method=, #set_description, #set_finalize_method, #set_get_supported_mip_versions_method, #set_help, #set_initialize_method, #set_query_method
inherited
#==, #to_ptr
Constructor Details
#initialize(handle = nil, retain: true, auto_release: true, name: nil, message_iterator_class: nil) ⇒ Filter
Returns a new instance of Filter.
604
605
606
607
608
609
610
611
612
613
614
615
616
|
# File 'lib/babeltrace2/graph/component-class-dev.rb', line 604
def initialize(handle = nil, retain: true, auto_release: true,
name: nil, message_iterator_class: nil)
if handle
super(handle, retain: retain, auto_release: auto_release)
else
raise ArgumentError, "invalid value for name" unless name
raise ArgumentError, "invalid value for message_iterator_class" unless message_iterator_class
handle = Babeltrace2.bt_component_class_filter_create(
name, message_iterator_class)
raise Babeltrace2.process_error if handle.null?
super(handle, retain: false)
end
end
|
Instance Method Details
663
664
665
666
|
# File 'lib/babeltrace2/graph/component-class-dev.rb', line 663
def input_port_connected_method=(method)
set_input_port_connected_method(method)
method
end
|
#output_port_connected_method=(method) ⇒ Object
679
680
681
682
|
# File 'lib/babeltrace2/graph/component-class-dev.rb', line 679
def output_port_connected_method=(method)
set_output_port_connected_method(method)
method
end
|
652
653
654
655
656
657
658
659
660
661
|
# File 'lib/babeltrace2/graph/component-class-dev.rb', line 652
def set_input_port_connected_method(method, &block)
if method.nil?
raise ArgumentError, "method or block must be provided" unless block_given?
method = block
end
method = Babeltrace2._wrap_component_class_filter_input_port_connected_method(@handle, method)
res = Babeltrace2.bt_component_class_filter_set_input_port_connected_method(@handle, method)
raise Babeltrace2.process_error(res) if res != :BT_COMPONENT_CLASS_SET_METHOD_STATUS_OK
self
end
|
#set_output_port_connected_method(method, &block) ⇒ Object
668
669
670
671
672
673
674
675
676
677
|
# File 'lib/babeltrace2/graph/component-class-dev.rb', line 668
def set_output_port_connected_method(method, &block)
if method.nil?
raise ArgumentError, "method or block must be provided" unless block_given?
method = block
end
method = Babeltrace2._wrap_component_class_filter_output_port_connected_method(@handle, method)
res = Babeltrace2.bt_component_class_filter_set_output_port_connected_method(@handle, method)
raise Babeltrace2.process_error(res) if res != :BT_COMPONENT_CLASS_SET_METHOD_STATUS_OK
self
end
|