class IDL::AST::Valuebox

Attributes

boxed_type[R]
idltype[R]

Public Class Methods

new(_name, _enclosure, params) click to toggle source
Calls superclass method IDL::AST::Leaf::new
# File lib/ridl/node.rb, line 1668
def initialize(_name, _enclosure, params)
  super(_name, _enclosure)
  @idltype = IDL::Type::Valuebox.new(self)
  @boxed_type = params[:type]
  unless @boxed_type.is_a?(IDL::Type::ScopedName) && @boxed_type.is_node?(IDL::AST::TemplateParam)
    if @boxed_type.resolved_type.is_a?(IDL::Type::Valuetype)
      raise "boxing valuetype #{@boxed_type.scoped_lm_name} in Valuebox #{scoped_lm_name} not allowed"
    end
  end
end

Public Instance Methods

instantiate(instantiation_context, _enclosure) click to toggle source
Calls superclass method IDL::AST::Leaf#instantiate
# File lib/ridl/node.rb, line 1693
def instantiate(instantiation_context, _enclosure)
  _params = {
    type: @boxed_type.instantiate(instantiation_context)
  }
  super(instantiation_context, _enclosure, _params)
end
is_local?(recurstk = []) click to toggle source
# File lib/ridl/node.rb, line 1679
def is_local?(recurstk = [])
  boxed_type.is_local?(recurstk)
end
marshal_dump() click to toggle source
Calls superclass method IDL::AST::Leaf#marshal_dump
# File lib/ridl/node.rb, line 1683
def marshal_dump
  super() << @idltype << @boxed_type
end
marshal_load(vars) click to toggle source
Calls superclass method IDL::AST::Leaf#marshal_load
# File lib/ridl/node.rb, line 1687
def marshal_load(vars)
  @boxed_type = vars.pop
  @idltype = vars.pop
  super(vars)
end