Class: IDL::AST::Typedef

Inherits:
Leaf
  • Object
show all
Defined in:
lib/ridl/node.rb,
lib/ridl/node.rb

Overview

BitField

Instance Attribute Summary collapse

Attributes inherited from Leaf

#annotations, #enclosure, #intern, #name, #prefix, #scopes

Instance Method Summary collapse

Methods inherited from Leaf

#has_annotations?, #is_template?, #lm_name, #lm_scopes, #replace_prefix, #repository_id, #resolve, #scoped_lm_name, #scoped_name, #set_repo_id, #set_repo_version, #typename, #unescaped_name

Constructor Details

#initialize(_name, enclosure, params) ⇒ Typedef

Returns a new instance of Typedef.



3173
3174
3175
3176
# File 'lib/ridl/node.rb', line 3173

def initialize(_name, enclosure, params)
  super(_name, enclosure)
  @idltype = params[:type]
end

Instance Attribute Details

#idltypeObject (readonly)

Returns the value of attribute idltype.



3171
3172
3173
# File 'lib/ridl/node.rb', line 3171

def idltype
  @idltype
end

Instance Method Details

#instantiate(instantiation_context, _enclosure) ⇒ Object



3191
3192
3193
# File 'lib/ridl/node.rb', line 3191

def instantiate(instantiation_context, _enclosure)
  super(instantiation_context, _enclosure, { type: @idltype.instantiate(instantiation_context) })
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:

  • (Boolean)


3178
3179
3180
# File 'lib/ridl/node.rb', line 3178

def is_local?(recurstk = [])
  @idltype.is_local?(recurstk)
end

#marshal_dumpObject



3182
3183
3184
# File 'lib/ridl/node.rb', line 3182

def marshal_dump
  super() << @idltype
end

#marshal_load(vars) ⇒ Object



3186
3187
3188
3189
# File 'lib/ridl/node.rb', line 3186

def marshal_load(vars)
  @idltype = vars.pop
  super(vars)
end