From ee1de9ab2ea6912c1f0e6e9a94686614eefe1e26 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sun, 9 Mar 2014 21:13:37 +0400 Subject: [PATCH] Streaming operator for generated types was moved into the type's namespace --- libuavcan/dsdl_compiler/data_type_template.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libuavcan/dsdl_compiler/data_type_template.hpp b/libuavcan/dsdl_compiler/data_type_template.hpp index 35cc99e258..69f9be1367 100644 --- a/libuavcan/dsdl_compiler/data_type_template.hpp +++ b/libuavcan/dsdl_compiler/data_type_template.hpp @@ -249,6 +249,13 @@ ${define_yaml_streamer(t.cpp_full_type_name, t.fields)} } +% for nsc in t.cpp_namespace_components: +namespace ${nsc} +{ +% endfor +namespace +{ + <%def name="define_streaming_operator(type_name)"> template inline Stream& operator<<(Stream& s, ${type_name}::ParameterType obj) @@ -264,3 +271,8 @@ ${define_streaming_operator(t.cpp_full_type_name + '::Response')} ${define_streaming_operator(t.cpp_full_type_name)} % endif +} +% for nsc in t.cpp_namespace_components: +} +% endfor +