108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# File 'lib/orogen/gen/tasks.rb', line 108
def register_for_generation
add =
if task.find_event_port(name)
"addEventPort"
else "addPort"
end
constructor = []
constructor << "ports()->#{add}(_#{name})"
if doc
constructor << " .doc(#{Generation.multiline_string_to_cxx(doc)})"
end
constructor.last << ';'
kind =
case self
when InputPort then "input_port_declaration"
else "output_port_declaration"
end
task.add_base_member(kind, "_#{name}",
"#{orocos_class}< #{type.cxx_name} >").
initializer("_#{name}(\"#{name}\")").
constructor(constructor.join("\n"))
end
|