class OroGen::Gen::RTT_CPP::ImportedProject

Instances of this class represent a task library loaded in a component, i.e. a set of TaskContext defined externally and imported using using_task_library.

For the task contexts imported this way, TaskContext#external_definition? returns true.

Attributes

main_project[R]

The main {Project} instance that groups all the imported task libraries

pkg[R]

The pkg-config file defining this oroGen project

Public Class Methods

load(main_project, pkg, file, verbose = true) click to toggle source

Import in the base component the task library whose orogen specification is included in file

# File lib/orogen/gen/imports.rb, line 199
def self.load(main_project, pkg, file, verbose = true)
    new(main_project, pkg).load(file, verbose)
end
new(main_project, pkg = nil) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 203
def initialize(main_project, pkg = nil)
    @main_project = main_project
    @pkg = pkg
    super()

    if pkg && main_project && main_project.has_typekit?(name)
        using_typekit pkg.project_name
    end
end

Public Instance Methods

eval(*args, &block) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 234
def eval(*args, &block)
    result = super
    validate_max_sizes_spec
    result
end
export_types(*args) click to toggle source

Simply ignore type export directives

# File lib/orogen/gen/imports.rb, line 292
def export_types(*args); self end
find_type(*args) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 246
def find_type(*args)
    # Check first that this project has the requested type
    # definition
    t = super
    # But, then, return the equivalent type from the master project
    if main_project
        main_project.find_type(t.name)
    else t
    end
end
generate() click to toggle source

Task library objects represent an import, and as such they cannot be generated. This method raises NotImplementedError

# File lib/orogen/gen/imports.rb, line 323
def generate; raise NotImplementedError end
generate_build_system() click to toggle source

Task library objects represent an import, and as such they cannot be generated. This method raises NotImplementedError

# File lib/orogen/gen/imports.rb, line 326
def generate_build_system; raise NotImplementedError end
import_types_from(name, *args) click to toggle source
# File lib/orogen/gen/imports.rb, line 264
def import_types_from(name, *args)
    if main_project && main_project.has_typekit?(name)
        using_typekit name
    else typekit
    end
end
imported?() click to toggle source
# File lib/orogen/gen/imports.rb, line 193
def imported?
    true
end
include_dirs() click to toggle source
# File lib/orogen/gen/imports.rb, line 213
def include_dirs
    if pkg
        pkg.include_dirs
    else Set.new
    end
end
load(*args, &block) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 240
def load(*args, &block)
    result = super
    validate_max_sizes_spec
    result
end
load_orogen_project(name, options = Hash.new) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 220
def load_orogen_project(name, options = Hash.new)
    if main_project
        main_project.load_orogen_project(name, options)
    else super
    end
end
load_task_library(name) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 227
def load_task_library(name)
    if main_project
        main_project.load_task_library(name)
    else super
    end
end
tasklib_pkg() click to toggle source
# File lib/orogen/gen/imports.rb, line 189
def tasklib_pkg
    @tasklib_pkg ||= Utilrb::PkgConfig.new(tasklib_pkg_name)
end
tasklib_pkg_name() click to toggle source

The pkg-config file for the task library of this oroGen project

# File lib/orogen/gen/imports.rb, line 185
def tasklib_pkg_name
    "#{name}-tasks-#{RTT_CPP.orocos_target}"
end
to_s() click to toggle source
# File lib/orogen/gen/imports.rb, line 328
def to_s
    "#<OroGen::Gen::RTT_CPP::ImportedProject: #{name} on #{main_project.name}>"
end
type_export_policy(*args) click to toggle source
# File lib/orogen/gen/imports.rb, line 293
def type_export_policy(*args); self end
using_library(*args) click to toggle source
# File lib/orogen/gen/imports.rb, line 271
def using_library(*args)
end
using_task_library(name) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 274
def using_task_library(name)
    if main_project
        super(main_project.using_task_library(name))
    else super
    end
end
using_typekit(name) click to toggle source
Calls superclass method
# File lib/orogen/gen/imports.rb, line 257
def using_typekit(name)
    if main_project
        super(main_project.using_typekit(name))
    else super
    end
end