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
The main {Project} instance that groups all the imported task libraries
The pkg-config file defining this oroGen project
Public Class Methods
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
# 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
# File lib/orogen/gen/imports.rb, line 234 def eval(*args, &block) result = super validate_max_sizes_spec result end
Simply ignore type export directives
# File lib/orogen/gen/imports.rb, line 292 def export_types(*args); self end
# 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
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
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
# 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
# File lib/orogen/gen/imports.rb, line 193 def imported? true end
# File lib/orogen/gen/imports.rb, line 213 def include_dirs if pkg pkg.include_dirs else Set.new end end
# File lib/orogen/gen/imports.rb, line 240 def load(*args, &block) result = super validate_max_sizes_spec result end
# 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
# 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
# File lib/orogen/gen/imports.rb, line 189 def tasklib_pkg @tasklib_pkg ||= Utilrb::PkgConfig.new(tasklib_pkg_name) end
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
# File lib/orogen/gen/imports.rb, line 328 def to_s "#<OroGen::Gen::RTT_CPP::ImportedProject: #{name} on #{main_project.name}>" end
# File lib/orogen/gen/imports.rb, line 293 def type_export_policy(*args); self end
# File lib/orogen/gen/imports.rb, line 271 def using_library(*args) end
# 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
# 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