Class: IDL::Type::ScopedName

Inherits:
NodeType show all
Defined in:
lib/ridl/type.rb

Constant Summary

Constants inherited from IDL::Type

Long, LongLong, Octet, Short, ULong, ULongLong, UShort

Instance Attribute Summary

Attributes inherited from NodeType

#node

Instance Method Summary collapse

Methods inherited from NodeType

#initialize

Methods inherited from IDL::Type

#is_anonymous?, #typeerror

Constructor Details

This class inherits a constructor from IDL::Type::NodeType

Instance Method Details

#instantiate(_context) ⇒ Object



104
105
106
107
108
109
110
111
# File 'lib/ridl/type.rb', line 104

def instantiate(_context)
  if self.is_template?
    cp = IDL::AST::TemplateParam.concrete_param(_context, @node)
    cp.is_a?(Type) ? cp : ScopedName.new(cp)
  else
    self
  end
end

#is_complete?Boolean

Returns:



89
90
91
# File 'lib/ridl/type.rb', line 89

def is_complete?
  resolved_type.is_complete?
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:



92
93
94
# File 'lib/ridl/type.rb', line 92

def is_local?(recurstk = [])
  resolved_type.is_local?(recurstk)
end

#is_node?(node_class) ⇒ Boolean

Returns:



95
96
97
# File 'lib/ridl/type.rb', line 95

def is_node?(node_class)
  @node.is_a?(IDL::AST::Typedef) ? @node.idltype.is_node?(node_class) : @node.is_a?(node_class)
end

#is_template?Boolean

Returns:



101
102
103
# File 'lib/ridl/type.rb', line 101

def is_template?
  @node.is_template?
end

#narrow(obj) ⇒ Object



83
84
85
# File 'lib/ridl/type.rb', line 83

def narrow(obj)
  @node.idltype.narrow(obj)
end

#resolved_nodeObject



98
99
100
# File 'lib/ridl/type.rb', line 98

def resolved_node
  @node.is_a?(IDL::AST::Typedef) ? @node.idltype.resolved_node : @node
end

#resolved_typeObject



86
87
88
# File 'lib/ridl/type.rb', line 86

def resolved_type
  @node.idltype.resolved_type
end

#typenameObject



80
81
82
# File 'lib/ridl/type.rb', line 80

def typename
  @node.name
end