class IDL::AST::Valuebox
def initialize(_name, _enclosure, params)
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
def instantiate(instantiation_context, _enclosure)
def instantiate(instantiation_context, _enclosure) _params = { type: @boxed_type.instantiate(instantiation_context) } super(instantiation_context, _enclosure, _params) end
def is_local?(recurstk = [])
def is_local?(recurstk = []) boxed_type.is_local?(recurstk) end
def marshal_dump
def marshal_dump super() << @idltype << @boxed_type end
def marshal_load(vars)
def marshal_load(vars) @boxed_type = vars.pop @idltype = vars.pop super(vars) end