Class: OroGen::Spec::Typekit::OpaqueInfoListener
- Inherits:
-
Object
- Object
- OroGen::Spec::Typekit::OpaqueInfoListener
- Includes:
- REXML::StreamListener
- Defined in:
- lib/orogen/spec/typekit.rb
Instance Attribute Summary collapse
-
#opaques ⇒ Object
readonly
Returns the value of attribute opaques.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
-
#typekit_registry ⇒ Object
readonly
Returns the value of attribute typekit_registry.
Instance Method Summary collapse
-
#initialize(typekit_registry) ⇒ OpaqueInfoListener
constructor
A new instance of OpaqueInfoListener.
- #tag_start(name, attributes) ⇒ Object
Constructor Details
#initialize(typekit_registry) ⇒ OpaqueInfoListener
Returns a new instance of OpaqueInfoListener
50 51 52 53 54 |
# File 'lib/orogen/spec/typekit.rb', line 50 def initialize(typekit_registry) @registry = Typelib::Registry.new @typekit_registry = typekit_registry @opaques = Array.new end |
Instance Attribute Details
#opaques ⇒ Object (readonly)
Returns the value of attribute opaques
48 49 50 |
# File 'lib/orogen/spec/typekit.rb', line 48 def opaques @opaques end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry
48 49 50 |
# File 'lib/orogen/spec/typekit.rb', line 48 def registry @registry end |
#typekit_registry ⇒ Object (readonly)
Returns the value of attribute typekit_registry
48 49 50 |
# File 'lib/orogen/spec/typekit.rb', line 48 def typekit_registry @typekit_registry end |
Instance Method Details
#tag_start(name, attributes) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/orogen/spec/typekit.rb', line 56 def tag_start(name, attributes) return if name != 'opaque' base_type_name = attributes['name'] inter_type_name = attributes['marshal_as'] includes = attributes['includes'] needs_copy = attributes['needs_copy'] opaques << OpaqueDefinition.new( typekit_registry.get(base_type_name), inter_type_name, Hash[include: includes.split(':'), needs_copy: (needs_copy == '1')], nil) registry.merge(typekit_registry.minimal(base_type_name)) end |