Class: Schema::Field::GroupSlot

Inherits:
Capnp::Struct show all
Defined in:
lib/capnp/generator/schema.capnp.rb

Constant Summary collapse

DEFAULT_OFFSET =
0
DEFAULT_HAD_EXPLICIT_DEFAULT =
false

Instance Method Summary collapse

Methods inherited from Capnp::Struct

decode_pointer, from_pointer, #initialize

Constructor Details

This class inherits a constructor from Capnp::Struct

Instance Method Details

#default_valueObject



345
# File 'lib/capnp/generator/schema.capnp.rb', line 345

def default_value = Schema::Value.from_pointer(read_pointer(3))

#had_explicit_defaultObject



348
# File 'lib/capnp/generator/schema.capnp.rb', line 348

def had_explicit_default = (read_u8(16, 0x00) & 0x1) != 0

#offsetObject



341
# File 'lib/capnp/generator/schema.capnp.rb', line 341

def offset = read_u32(4, 0)

#to_objObject



350
351
352
353
354
355
356
357
# File 'lib/capnp/generator/schema.capnp.rb', line 350

def to_obj
  res = {}
  res["offset"] = offset
  res["type"] = type&.to_obj
  res["default_value"] = default_value&.to_obj
  res["had_explicit_default"] = had_explicit_default
  res
end

#typeObject



343
# File 'lib/capnp/generator/schema.capnp.rb', line 343

def type = Schema::Type.from_pointer(read_pointer(2))