OpaqueFwd.hpp
Go to the documentation of this file.
00001 #ifndef OROGEN_<%= typekit.name %>_OPAQUE_FWD_HPP
00002 #define OROGEN_<%= typekit.name %>_OPAQUE_FWD_HPP
00003 
00004 <% types_containing_opaques = type_sets.types.find_all { |t| t.contains_opaques? && !t.opaque? } %>
00005 <% all_types = type_sets.opaque_types.map { |op| op.type } + types_containing_opaques
00006    all_types.dup.each do |type|
00007        all_types << typekit.intermediate_type_for(type)
00008    end
00009    all_types.map! do |type|
00010        while type <= Typelib::ArrayType
00011            type = type.deference
00012        end
00013        type
00014    end
00015    need_full_definition, forward_declared = all_types.partition do |type|
00016        type.name =~ /</ || (type.opaque? && type.metadata.get('opaque_is_typedef').include?('1'))
00017    end
00018 %>
00019 
00020 <%= includes = need_full_definition.inject(Set.new) do |all, type|
00021        all |= typekit.include_for_type(type).to_set
00022     end
00023     typekit.cxx_gen_includes(*includes)
00024 %>
00025 
00026 <% current_namespace = '/' %>
00027 <% forward_declared.sort_by(&:name).each do |type| %>
00028 <%= RTT_CPP.adapt_namespace(current_namespace, type.namespace) %>
00029 <%     current_namespace = type.namespace %>
00030 class <%= type.basename %>;
00031 <% end %>
00032 <%= RTT_CPP.adapt_namespace(current_namespace, '/') %>
00033 
00034 #endif
00035 


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Sat Jun 8 2019 19:52:17