Class: Babeltrace2Gen::BTEnvironmentClass

Inherits:
Object
  • Object
show all
Extended by:
BTFromH
Includes:
BTLocator, BTMatchMembers, BTPrinter
Defined in:
lib/metababel/bt2_trace_class_generator.rb

Constant Summary collapse

BT_MATCH_ATTRS =
[:entries]

Constants included from BTPrinter

Babeltrace2Gen::BTPrinter::INDENT_INCREMENT

Instance Attribute Summary collapse

Attributes included from BTLocator

#variable

Instance Method Summary collapse

Methods included from BTFromH

from_h

Methods included from BTMatchMembers

#match?

Methods included from BTLocator

#rec_event_class, #rec_member_class, #rec_stream_class, #rec_trace_class, #resolve_path

Methods included from BTPrinter

context, #name_sanitized, pr, #scope

Constructor Details

#initialize(parent:, entries: []) ⇒ BTEnvironmentClass

Returns a new instance of BTEnvironmentClass.



979
980
981
982
# File 'lib/metababel/bt2_trace_class_generator.rb', line 979

def initialize(parent:, entries: [])
  @parent = parent
  @entries = entries.map { |entry| BTEntryClass.from_h(self, entry) }
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



975
976
977
# File 'lib/metababel/bt2_trace_class_generator.rb', line 975

def entries
  @entries
end

#parentObject (readonly)

Returns the value of attribute parent.



975
976
977
# File 'lib/metababel/bt2_trace_class_generator.rb', line 975

def parent
  @parent
end

Instance Method Details

#get_getter(trace:, arg_variables:) ⇒ Object



984
985
986
987
988
989
990
# File 'lib/metababel/bt2_trace_class_generator.rb', line 984

def get_getter(trace:, arg_variables:)
  scope do
    @entries.each do |entry|
      entry.get_getter(trace: trace, arg_variables: arg_variables)
    end
  end
end