Class: IDL::AST::Enumerator
- Defined in:
- lib/ridl/node.rb,
lib/ridl/node.rb
Overview
Enum
Constant Summary collapse
- NAMETYPE =
:class
Instance Attribute Summary collapse
-
#enum ⇒ Object
readonly
Returns the value of attribute enum.
-
#idltype ⇒ Object
readonly
Returns the value of attribute idltype.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Leaf
#annotations, #enclosure, #intern, #lm_name, #name, #prefix, #scopes
Instance Method Summary collapse
-
#initialize(_name, _enclosure, params) ⇒ Enumerator
constructor
A new instance of Enumerator.
- #instantiate(_context, _enclosure) ⇒ Object
- #marshal_dump ⇒ Object
- #marshal_load(vars) ⇒ Object
Methods inherited from Leaf
#_set_prefix, #has_annotations?, #is_local?, #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) ⇒ Enumerator
Returns a new instance of Enumerator.
2800 2801 2802 2803 2804 2805 2806 |
# File 'lib/ridl/node.rb', line 2800 def initialize(_name, _enclosure, params) super(_name, _enclosure) @idltype = IDL::Type::ULong.new @enum = params[:enum] @value = params[:value] @enum.add_enumerator(self) end |
Instance Attribute Details
#enum ⇒ Object (readonly)
Returns the value of attribute enum.
2799 2800 2801 |
# File 'lib/ridl/node.rb', line 2799 def enum @enum end |
#idltype ⇒ Object (readonly)
Returns the value of attribute idltype.
2799 2800 2801 |
# File 'lib/ridl/node.rb', line 2799 def idltype @idltype end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
2799 2800 2801 |
# File 'lib/ridl/node.rb', line 2799 def value @value end |
Instance Method Details
#instantiate(_context, _enclosure) ⇒ Object
2819 2820 2821 |
# File 'lib/ridl/node.rb', line 2819 def instantiate(_context, _enclosure) super(_context, _enclosure, { :enum => @enum, :value => @value }) end |
#marshal_dump ⇒ Object
2808 2809 2810 |
# File 'lib/ridl/node.rb', line 2808 def marshal_dump super() << @idltype << @enum << @value end |
#marshal_load(vars) ⇒ Object
2812 2813 2814 2815 2816 2817 |
# File 'lib/ridl/node.rb', line 2812 def marshal_load(vars) @value = vars.pop @enum = vars.pop @idltype = vars.pop super(vars) end |