Class: Babeltrace::CTF::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/babeltrace/ctf/events.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ Definition

Returns a new instance of Definition.



305
306
307
# File 'lib/babeltrace/ctf/events.rb', line 305

def initialize(definition)
  @definition = definition
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



298
299
300
# File 'lib/babeltrace/ctf/events.rb', line 298

def definition
  @definition
end

Class Method Details

.create(d) ⇒ Object



300
301
302
303
# File 'lib/babeltrace/ctf/events.rb', line 300

def self.create(d)
  return nil if d.pointer.null?
  d.decl.def_class.new(d)
end

Instance Method Details

#declObject



313
314
315
# File 'lib/babeltrace/ctf/events.rb', line 313

def decl
  @definition.decl
end

#nameObject



309
310
311
# File 'lib/babeltrace/ctf/events.rb', line 309

def name
  @definition.name
end