Class: Babeltrace2::UserSource
- Inherits:
-
UserComponentClass
- Object
- UserComponentClass
- Babeltrace2::UserSource
- Defined in:
- lib/babeltrace2/plugin/plugin-dev.rb
Class Attribute Summary collapse
-
.message_iterator_class ⇒ Object
Returns the value of attribute message_iterator_class.
Instance Attribute Summary collapse
-
#user_message_iterator_class ⇒ Object
readonly
Returns the value of attribute user_message_iterator_class.
Attributes inherited from UserComponentClass
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ UserSource
constructor
A new instance of UserSource.
Methods inherited from UserComponentClass
Constructor Details
#initialize ⇒ UserSource
Returns a new instance of UserSource.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/babeltrace2/plugin/plugin-dev.rb', line 214 def initialize = self.class. raise "'message_iterator_class' sould be defined" unless if .kind_of?(Class) && < UserMessageIterator = .new @user_message_iterator_class = = . end raise "'message_iterator_class' sould be an instance of UserMessageIterator or BTMessageIteratorClass" unless .kind_of?(BTMessageIteratorClass) finalize_method = get_method(:finalize, 1) get_supported_mip_versions_method = get_method(:get_supported_mip_versions, 5) initialize_method = get_method(:init, 4) query_method = get_method(:query, 5) output_port_connected_method = get_method(:output_port_connected, 3) name = self.class.get_name description = self.class.description help = self.class.help @bt_component_class = BTComponentClassSource.new( name: name, message_iterator_class: ) @bt_component_class.description = description if description @bt_component_class.help = help if help @bt_component_class.finalize_method = finalize_method if finalize_method @bt_component_class.initialize_method = initialize_method if initialize_method @bt_component_class.get_supported_mip_versions_method = get_supported_mip_versions_method if get_supported_mip_versions_method @bt_component_class.query_method = query_method if query_method @bt_component_class.output_port_connected_method = output_port_connected_method if output_port_connected_method end |
Class Attribute Details
.message_iterator_class ⇒ Object
Returns the value of attribute message_iterator_class.
208 209 210 |
# File 'lib/babeltrace2/plugin/plugin-dev.rb', line 208 def @message_iterator_class end |
Instance Attribute Details
#user_message_iterator_class ⇒ Object (readonly)
Returns the value of attribute user_message_iterator_class.
213 214 215 |
# File 'lib/babeltrace2/plugin/plugin-dev.rb', line 213 def @user_message_iterator_class end |
Class Method Details
.type ⇒ Object
209 210 211 |
# File 'lib/babeltrace2/plugin/plugin-dev.rb', line 209 def type :BT_COMPONENT_CLASS_TYPE_SOURCE end |