Class: RetroIDL::ASN::BaseType
- Inherits:
-
Object
- Object
- RetroIDL::ASN::BaseType
- Defined in:
- lib/retro_idl/asn/base_type.rb
Overview
Copyright © 2016 Cameron Harper
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Direct Known Subclasses
BITSTRING, BOOLEAN, CHOICE, DefinedType, ENUMERATED, INTEGER, NULL, OCTETSTRING, REAL, SEQUENCE, SEQUENCEOF
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**opts) ⇒ BaseType
constructor
Common type object initialisation.
-
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module.
Constructor Details
#initialize(**opts) ⇒ BaseType
Common type object initialisation
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/retro_idl/asn/base_type.rb', line 34 def initialize(**opts) @mod = nil @tag = nil @parent = parent @id = opts[:id] @location = opts[:location] @constraint = nil if opts[:tag] @tag = Tag.new(**opts[:tag]) end if opts[:constraint] @constraint = Constraint.new(self, **opts[:constraint]) end end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/retro_idl/asn/base_type.rb', line 22 def id @id end |
Class Method Details
.===(otherClass) ⇒ Object
75 76 77 78 79 80 81 82 83 |
# File 'lib/retro_idl/asn/base_type.rb', line 75 def self.===(otherClass) if self == otherClass true else false end end |
Instance Method Details
#link(mod, stack) ⇒ MODULE?
resolve symbols to definitions in module
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/retro_idl/asn/base_type.rb', line 53 def link(mod, stack) if @mod.nil? or @mod != mod @mod = nil if @tag.nil? or @tag.link(mod, []) @mod = mod stack.push self @mod.setBranch stack end else @mod end end |