Module: OroGen::Gen::RTT_CPP::PropertyGeneration

Includes:
ConfigurationObjectGeneration
Defined in:
lib/orogen/gen/tasks.rb

Overview

Module that is used to add code generation functionality to Spec::Property

Instance Method Summary collapse

Methods included from ConfigurationObjectGeneration

#cxx_default_value, #gen_dynamic_setter

Instance Method Details

#register_for_generationObject



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/orogen/gen/tasks.rb', line 59

def register_for_generation
    constructor = []
    if default_value
        constructor << "_#{name}.set(#{cxx_default_value});"
    end
    constructor << "properties()->addProperty( _#{name} );"

    task.add_base_member("property", "_#{name}",
        "RTT::Property< #{type.cxx_name} >").
        initializer("_#{name}(\"#{name}\", #{Generation.multiline_string_to_cxx(doc)})").
        constructor(constructor.join("\n"))


    gen_dynamic_setter

end

#used_typesObject



55
56
57
# File 'lib/orogen/gen/tasks.rb', line 55

def used_types
    each_interface_type.to_a
end