Class: Schema::Field::GroupSlot
Constant Summary
collapse
- DEFAULT_OFFSET =
0
- DEFAULT_HAD_EXPLICIT_DEFAULT =
false
Instance Method Summary
collapse
decode_pointer, from_pointer, #initialize
Constructor Details
This class inherits a constructor from Capnp::Struct
Instance Method Details
#default_value ⇒ Object
345
|
# File 'lib/capnp/generator/schema.capnp.rb', line 345
def default_value = Schema::Value.from_pointer(read_pointer(3))
|
#had_explicit_default ⇒ Object
348
|
# File 'lib/capnp/generator/schema.capnp.rb', line 348
def had_explicit_default = (read_u8(16, 0x00) & 0x1) != 0
|
#offset ⇒ Object
341
|
# File 'lib/capnp/generator/schema.capnp.rb', line 341
def offset = read_u32(4, 0)
|
#to_obj ⇒ Object
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
|
#type ⇒ Object
343
|
# File 'lib/capnp/generator/schema.capnp.rb', line 343
def type = Schema::Type.from_pointer(read_pointer(2))
|