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, TinyShort, ULong, ULongLong, UShort, UTinyShort

Instance Attribute Summary

Attributes inherited from NodeType

#node

Instance Method Summary collapse

Methods inherited from NodeType

#initialize, #matches?

Methods inherited from IDL::Type

#is_anonymous?, #matches?, #typeerror

Constructor Details

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

Instance Method Details

#instantiate(instantiation_context) ⇒ Object



134
135
136
137
138
139
140
141
# File 'lib/ridl/type.rb', line 134

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

#is_complete?Boolean

Returns:



114
115
116
# File 'lib/ridl/type.rb', line 114

def is_complete?
  resolved_type.is_complete?
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:



118
119
120
# File 'lib/ridl/type.rb', line 118

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

#is_node?(node_class) ⇒ Boolean

Returns:



122
123
124
# File 'lib/ridl/type.rb', line 122

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:



130
131
132
# File 'lib/ridl/type.rb', line 130

def is_template?
  @node.is_template?
end

#narrow(obj) ⇒ Object



106
107
108
# File 'lib/ridl/type.rb', line 106

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

#resolved_nodeObject



126
127
128
# File 'lib/ridl/type.rb', line 126

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

#resolved_typeObject



110
111
112
# File 'lib/ridl/type.rb', line 110

def resolved_type
  @node.idltype.resolved_type
end

#typenameObject



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

def typename
  @node.name
end