class OroGen::Gen::RTT_CPP::TaskContextGeneration::GeneratedMethod
Represents a method definition/declaration in the generated code
This is mainly meant for plugins
See also in_base_hook to add code to the hooks
Attributes
in_base[RW]
name[R]
return_type[R]
signature[R]
Public Class Methods
new(task, return_type, name, signature)
click to toggle source
Calls superclass method
OroGen::Gen::RTT_CPP::TaskContextGeneration::GeneratedObject.new
# File lib/orogen/gen/tasks.rb, line 813 def initialize(task, return_type, name, signature) super(task) @return_type = return_type @name = name @signature = signature end
Public Instance Methods
generate_declaration()
click to toggle source
# File lib/orogen/gen/tasks.rb, line 823 def generate_declaration decl = "virtual #{return_type} #{name}(#{signature})" if doc decl = "#{doc} */\n#{decl}" end if !body decl = "#{decl} = 0" end "#{decl};" end
generate_definition()
click to toggle source
# File lib/orogen/gen/tasks.rb, line 834 def generate_definition if body "#{return_type} #{task.basename}#{'Base' if in_base}::#{name}(#{signature})\n" + "{\n" + generate_body + "\n}" end end