Class: Babeltrace2Gen::BTFieldClass::BitArray
- Inherits:
-
Babeltrace2Gen::BTFieldClass
- Object
- Babeltrace2Gen::BTFieldClass
- Babeltrace2Gen::BTFieldClass::BitArray
- Extended by:
- Babeltrace2Gen::BTFromH
- Defined in:
- lib/metababel/bt2_trace_class_generator.rb
Constant Summary
Constants inherited from Babeltrace2Gen::BTFieldClass
Constants included from Babeltrace2Gen::BTPrinter
Babeltrace2Gen::BTPrinter::INDENT_INCREMENT
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Attributes inherited from Babeltrace2Gen::BTFieldClass
#cast_type, #cast_type_is_struct, #type
Attributes included from Babeltrace2Gen::BTLocator
Instance Method Summary collapse
- #get_declarator(trace_class:, variable:) ⇒ Object
-
#initialize(parent:, length:) ⇒ BitArray
constructor
A new instance of BitArray.
Methods included from Babeltrace2Gen::BTFromH
Methods inherited from Babeltrace2Gen::BTFieldClass
#bt_get_variable, from_h, #get_getter, #get_setter
Methods included from Babeltrace2Gen::BTMatch
Methods included from Babeltrace2Gen::BTPrinter
context, #name_sanitized, pr, #scope
Methods included from Babeltrace2Gen::BTLocator
#rec_event_class, #rec_member_class, #rec_stream_class, #rec_trace_class, #resolve_path
Constructor Details
#initialize(parent:, length:) ⇒ BitArray
Returns a new instance of BitArray.
478 479 480 481 |
# File 'lib/metababel/bt2_trace_class_generator.rb', line 478 def initialize(parent:, length:) @parent = parent @length = length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
473 474 475 |
# File 'lib/metababel/bt2_trace_class_generator.rb', line 473 def length @length end |
Instance Method Details
#get_declarator(trace_class:, variable:) ⇒ Object
483 484 485 |
# File 'lib/metababel/bt2_trace_class_generator.rb', line 483 def get_declarator(trace_class:, variable:) pr "#{variable} = bt_field_class_bit_array_create(#{trace_class}, #{@length});" end |