class OroGen::Gen::RTT_CPP::OpaqueDefinition

Data structure that represents the definition for an opaque type

See OroGen::Gen::RTT_CPP::Typekit#opaque_type

Attributes

caller[RW]

Backtrace at the definition point

code_generator[R]

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.

intermediate[R]

The Typelib::Type subclass that represents the intermediate type used to marshal this opaque

options[R]

Option hash

type[R]

The Typelib::Type subclass that represents this opaque

Public Class Methods

new(type, intermediate, options, code_generator) click to toggle source
# File lib/orogen/gen/typekit.rb, line 517
def initialize(type, intermediate, options, code_generator)
    if !type || !intermediate
        raise ArgumentError, "trying to create an opaque definition with nil types"
    end

    @type, @intermediate, @options, @code_generator =
        type, intermediate, options, code_generator
end

Public Instance Methods

generate_templates?() click to toggle source

If true, the conversion function is provided by the user, and orogen should therefore generate the corresponding templates.

# File lib/orogen/gen/typekit.rb, line 533
def generate_templates?; !code_generator end
includes() click to toggle source

The set of paths that should be added to -I to the generated type to intermediate convertion.

# File lib/orogen/gen/typekit.rb, line 527
def includes; options[:include] end
needs_copy?() click to toggle source

If true, the opaque needs to be copied into the intermediate. If false, the convertion does not require a copy.

# File lib/orogen/gen/typekit.rb, line 530
def needs_copy?; !!options[:needs_copy] end