Class: OroGen::Spec::OpaqueDefinition
- Inherits:
- 
      Object
      
        - Object
- OroGen::Spec::OpaqueDefinition
 
- Defined in:
- lib/orogen/spec/opaque_definition.rb
Overview
Data structure that represents the definition for an opaque type
See Typekit#opaque_type
Instance Attribute Summary collapse
- 
  
    
      #caller  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Backtrace at the definition point. 
- 
  
    
      #code_generator  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    If non-nil, this is a block which, when called, will return the C++ code needed to convert typeintointermediate.
- 
  
    
      #intermediate  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The Typelib::Type subclass that represents the intermediate type used to marshal this opaque. 
- 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Option hash. 
- 
  
    
      #type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The Typelib::Type subclass that represents this opaque. 
Instance Method Summary collapse
- 
  
    
      #generate_templates?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    If true, the convertion function is provided by the user, and orogen should therefore generate the corresponding templates. 
- 
  
    
      #includes  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    The set of paths that should be added to -I to the generated typetointermediateconvertion.
- 
  
    
      #initialize(type, intermediate, options, code_generator)  ⇒ OpaqueDefinition 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of OpaqueDefinition. 
- 
  
    
      #needs_copy?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    If true, the opaque needs to be copied into the intermediate. 
Constructor Details
#initialize(type, intermediate, options, code_generator) ⇒ OpaqueDefinition
Returns a new instance of OpaqueDefinition
| 22 23 24 25 26 27 28 29 | # File 'lib/orogen/spec/opaque_definition.rb', line 22 def initialize(type, intermediate, , code_generator) if !type || !intermediate raise ArgumentError, "trying to create an opaque definition with nil types" end @type, @intermediate, @options, @code_generator = type, intermediate, , code_generator end | 
Instance Attribute Details
#caller ⇒ Object
Backtrace at the definition point
| 20 21 22 | # File 'lib/orogen/spec/opaque_definition.rb', line 20 def caller @caller end | 
#code_generator ⇒ Object (readonly)
If non-nil, this is a block which, when called, will return the C++ code
needed to convert type into intermediate. If nil,
it is assumed that the user will provide that code.
| 17 18 19 | # File 'lib/orogen/spec/opaque_definition.rb', line 17 def code_generator @code_generator end | 
#intermediate ⇒ Object (readonly)
The Typelib::Type subclass that represents the intermediate type used to marshal this opaque
| 11 12 13 | # File 'lib/orogen/spec/opaque_definition.rb', line 11 def intermediate @intermediate end | 
#options ⇒ Object (readonly)
Option hash
| 13 14 15 | # File 'lib/orogen/spec/opaque_definition.rb', line 13 def @options end | 
#type ⇒ Object (readonly)
The Typelib::Type subclass that represents this opaque
| 8 9 10 | # File 'lib/orogen/spec/opaque_definition.rb', line 8 def type @type end | 
Instance Method Details
#generate_templates? ⇒ Boolean
If true, the convertion function is provided by the user, and orogen should therefore generate the corresponding templates.
| 38 | # File 'lib/orogen/spec/opaque_definition.rb', line 38 def generate_templates?; !code_generator end | 
#includes ⇒ Object
The set of paths that should be added to -I to the generated
type to intermediate convertion.
| 32 | # File 'lib/orogen/spec/opaque_definition.rb', line 32 def includes; [:include] end | 
#needs_copy? ⇒ Boolean
If true, the opaque needs to be copied into the intermediate. If false, the convertion does not require a copy.
| 35 | # File 'lib/orogen/spec/opaque_definition.rb', line 35 def needs_copy?; !![:needs_copy] end |