Class: OroGen::Gen::RTT_CPP::OpaqueDefinition
- Inherits:
-
Object
- Object
- OroGen::Gen::RTT_CPP::OpaqueDefinition
- Defined in:
- lib/orogen/gen/typekit.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
type
intointermediate
. -
#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 conversion 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
type
tointermediate
convertion. -
#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
518 519 520 521 522 523 524 525 |
# File 'lib/orogen/gen/typekit.rb', line 518 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
516 517 518 |
# File 'lib/orogen/gen/typekit.rb', line 516 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.
513 514 515 |
# File 'lib/orogen/gen/typekit.rb', line 513 def code_generator @code_generator end |
#intermediate ⇒ Object (readonly)
The Typelib::Type subclass that represents the intermediate type used to marshal this opaque
507 508 509 |
# File 'lib/orogen/gen/typekit.rb', line 507 def intermediate @intermediate end |
#options ⇒ Object (readonly)
Option hash
509 510 511 |
# File 'lib/orogen/gen/typekit.rb', line 509 def @options end |
#type ⇒ Object (readonly)
The Typelib::Type subclass that represents this opaque
504 505 506 |
# File 'lib/orogen/gen/typekit.rb', line 504 def type @type end |
Instance Method Details
#generate_templates? ⇒ Boolean
If true, the conversion function is provided by the user, and orogen should therefore generate the corresponding templates.
534 |
# File 'lib/orogen/gen/typekit.rb', line 534 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.
528 |
# File 'lib/orogen/gen/typekit.rb', line 528 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.
531 |
# File 'lib/orogen/gen/typekit.rb', line 531 def needs_copy?; !![:needs_copy] end |