Class: Schema::Type::GroupAnyPointer

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

Defined Under Namespace

Classes: GroupImplicitMethodParameter, GroupParameter, GroupUnconstrained, Which

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

#implicit_method_parameterObject



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

def implicit_method_parameter = GroupImplicitMethodParameter.new(@data, @data_size, @pointers, @pointers_size)

#is_implicit_method_parameter?Boolean

Returns:

  • (Boolean)


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

def is_implicit_method_parameter? = which? == Which::ImplicitMethodParameter

#is_parameter?Boolean

Returns:

  • (Boolean)


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

def is_parameter? = which? == Which::Parameter

#is_unconstrained?Boolean

Returns:

  • (Boolean)


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

def is_unconstrained? = which? == Which::Unconstrained

#parameterObject



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

def parameter = GroupParameter.new(@data, @data_size, @pointers, @pointers_size)

#to_objObject



793
794
795
796
797
798
799
800
801
# File 'lib/capnp/generator/schema.capnp.rb', line 793

def to_obj
  res = {}
  case which?
  when Which::Unconstrained then res["unconstrained"] = unconstrained.to_obj
  when Which::Parameter then res["parameter"] = parameter.to_obj
  when Which::ImplicitMethodParameter then res["implicit_method_parameter"] = implicit_method_parameter.to_obj
  end
  res
end

#unconstrainedObject



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

def unconstrained = GroupUnconstrained.new(@data, @data_size, @pointers, @pointers_size)

#which?Boolean

Returns:

  • (Boolean)


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

def which? = Which.from_integer(read_u16(8, 0))