class IDL::AST::Enumerator
Attributes
enum[R]
idltype[R]
value[R]
Public Class Methods
new(_name, _enclosure, params)
click to toggle source
Calls superclass method
IDL::AST::Leaf::new
# File lib/ridl/node.rb, line 2865 def initialize(_name, _enclosure, params) super(_name, _enclosure) @idltype = IDL::Type::ULong.new @enum = params[:enum] @value = params[:value] @enum.add_enumerator(self) end
Public Instance Methods
instantiate(instantiation_context, _enclosure)
click to toggle source
Calls superclass method
IDL::AST::Leaf#instantiate
# File lib/ridl/node.rb, line 2884 def instantiate(instantiation_context, _enclosure) # find already instantiated Enum parent _enum = _enclosure.resolve(@enum.name) raise "Unable to resolve instantiated Enum scope for enumerator #{@enum.name}::#{name} instantiation" unless _enum super(instantiation_context, _enclosure, { enum: _enum, value: @value }) end
marshal_dump()
click to toggle source
Calls superclass method
IDL::AST::Leaf#marshal_dump
# File lib/ridl/node.rb, line 2873 def marshal_dump super() << @idltype << @enum << @value end
marshal_load(vars)
click to toggle source
Calls superclass method
IDL::AST::Leaf#marshal_load
# File lib/ridl/node.rb, line 2877 def marshal_load(vars) @value = vars.pop @enum = vars.pop @idltype = vars.pop super(vars) end