<commit_before>/* Generated from orogen/lib/orogen/templates/tasks/Task.cpp */

#include "<%= task.basename %>.hpp"

using namespace <%= task.component.name %>;

<%= task.basename %>::<%= task.basename %>(std::string const& name<%= ", TaskCore::TaskState initial_state" unless task.fixed_initial_state? %>)
    : <%= task.basename %>Base(name<%= ", initial_state" unless task.fixed_initial_state? %>)
{
}

<%= task.basename %>::<%= task.basename %>(std::string const& name, RTT::ExecutionEngine* engine<%= ", TaskCore::TaskState initial_state" unless task.fixed_initial_state? %>)
    : <%= task.basename %>Base(name, engine<%= ", initial_state" unless task.fixed_initial_state? %>)
{
}

<%= task.basename %>::~<%= task.basename %>()
{
}

<%= task.self_user_methods.sort_by(&:name).
    map { |m| m.with_indent(0, :definition) }.
    compact.join("\n\n") %>

/// The following lines are template definitions for the various state machine
// hooks defined by Orocos::RTT. See <%= task.basename %>.hpp for more detailed
// documentation about them.

<% %w{configure start update error stop cleanup}.each do |hook_name| %>
<%    snippets = task.user_hook_code[hook_name] %>
<%    is_boolean = (hook_name == "start" || hook_name == "configure") %>
<%= (is_boolean ? 'bool' : 'void') %> <%= task.basename %>::<%= hook_name %>Hook()
{
<% if is_boolean %>
    if (! <%= task.superclass.name %>::<%= hook_name %>Hook())
        return false;
<% else %>
    <%= task.superclass.name %>::<%= hook_name %>Hook();
<% end %>
<% snippets.each do |code| %>
<%     if code.respond_to?(:to_str) %>
<%= code %>
<%     else %>
<%= code.call %>
<%     end %>
<% end %>
<% if is_boolean %>
    return true;
<% end %>
}
<% end %><commit_msg>fix generated Hook supercalls in the user-visible Task class<commit_after>/* Generated from orogen/lib/orogen/templates/tasks/Task.cpp */

#include "<%= task.basename %>.hpp"

using namespace <%= task.component.name %>;

<%= task.basename %>::<%= task.basename %>(std::string const& name<%= ", TaskCore::TaskState initial_state" unless task.fixed_initial_state? %>)
    : <%= task.basename %>Base(name<%= ", initial_state" unless task.fixed_initial_state? %>)
{
}

<%= task.basename %>::<%= task.basename %>(std::string const& name, RTT::ExecutionEngine* engine<%= ", TaskCore::TaskState initial_state" unless task.fixed_initial_state? %>)
    : <%= task.basename %>Base(name, engine<%= ", initial_state" unless task.fixed_initial_state? %>)
{
}

<%= task.basename %>::~<%= task.basename %>()
{
}

<%= task.self_user_methods.sort_by(&:name).
    map { |m| m.with_indent(0, :definition) }.
    compact.join("\n\n") %>

/// The following lines are template definitions for the various state machine
// hooks defined by Orocos::RTT. See <%= task.basename %>.hpp for more detailed
// documentation about them.

<% %w{configure start update error stop cleanup}.each do |hook_name| %>
<%    snippets = task.user_hook_code[hook_name] %>
<%    is_boolean = (hook_name == "start" || hook_name == "configure") %>
<%= (is_boolean ? 'bool' : 'void') %> <%= task.basename %>::<%= hook_name %>Hook()
{
<% if is_boolean %>
    if (! <%= task.basename %>Base::<%= hook_name %>Hook())
        return false;
<% else %>
    <%= task.basename %>Base::<%= hook_name %>Hook();
<% end %>
<% snippets.each do |code| %>
<%     if code.respond_to?(:to_str) %>
<%= code %>
<%     else %>
<%= code.call %>
<%     end %>
<% end %>
<% if is_boolean %>
    return true;
<% end %>
}
<% end %>
{'fraction_non_alphanumeric': 0.21356711698764014, 'fraction_numerical': 0.0005748778384593274, 'mean_word_length': 4.304878048780488, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4022838', 'n_tokens_mistral': 1301, 'n_tokens_neox': 1160, 'n_words': 256}