Module: OroGen::Gen::RTT_CPP::AttributeGeneration

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

Overview

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

Instance Method Summary collapse

Methods included from ConfigurationObjectGeneration

#cxx_default_value, #gen_dynamic_setter

Instance Method Details

#register_for_generationObject


86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/orogen/gen/tasks.rb', line 86

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

    task.add_base_member("attribute", "_#{name}",
        "RTT::Attribute< #{type.cxx_name} >").
        initializer("_#{name}(\"#{name}\")").
        constructor(constructor.join("\n"))
    
    gen_dynamic_setter
end

#used_typesObject


82
83
84
# File 'lib/orogen/gen/tasks.rb', line 82

def used_types
    each_interface_type.to_a
end