Class: IDL::AST::Typedef

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

Overview

Enumerator

Constant Summary collapse

NAMETYPE =
:class

Instance Attribute Summary collapse

Attributes inherited from Leaf

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

Instance Method Summary collapse

Methods inherited from Leaf

#_set_prefix, #has_annotations?, #is_template?, #lm_name_for_scope, #parsed_name_scope, #replace_prefix, #repo_scopes, #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.



2847
2848
2849
2850
# File 'lib/ridl/node.rb', line 2847

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

Instance Attribute Details

#idltypeObject (readonly)

Returns the value of attribute idltype.



2845
2846
2847
# File 'lib/ridl/node.rb', line 2845

def idltype
  @idltype
end

Instance Method Details

#instantiate(_context, _enclosure) ⇒ Object



2865
2866
2867
# File 'lib/ridl/node.rb', line 2865

def instantiate(_context, _enclosure)
  super(_context, _enclosure, { :type => @idltype.instantiate(_context) })
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:

  • (Boolean)


2852
2853
2854
# File 'lib/ridl/node.rb', line 2852

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

#marshal_dumpObject



2856
2857
2858
# File 'lib/ridl/node.rb', line 2856

def marshal_dump
  super() << @idltype
end

#marshal_load(vars) ⇒ Object



2860
2861
2862
2863
# File 'lib/ridl/node.rb', line 2860

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