From 64ee803068269fe3b9563fd415c420fb513a1c9b Mon Sep 17 00:00:00 2001 From: Terry May <terrydmay@gmail.com> Date: Mon, 9 Sep 2019 19:45:41 -0400 Subject: grc: Fix C++ code generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added support for C++ std::map<> from python dict - Fixed default initialization of parameters in main() - Added missing include for realtime scheduling - Added default CMake option for std=c++11 as this is required for gnuradio >= 3.8 - Fixed mako template to add initialization to parameter declarations in main() - Fixed C++ constructor initialization list generation - Fixed parameter type determination when an lvalue is used in an rvalue expression - Improved determining type of C++ variables - Added C++ support for gr_complex parameters - Fixed C++ generation of nested container types - Added C++ support for virtual source/sink - Moved cmake CMAKE_CXX_STANDARD 11 option from options.yml to CMakeLists.txt.mako - Fixed qtqui_sink to allow multiple instances - Revised virtual connection processing in cpp_top_block.py Reviewed-By: HÃ¥kon Vagsether <hauk142@gmail.com> --- grc/core/blocks/virtual.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'grc/core/blocks/virtual.py') diff --git a/grc/core/blocks/virtual.py b/grc/core/blocks/virtual.py index a742419d27..598e8371d5 100644 --- a/grc/core/blocks/virtual.py +++ b/grc/core/blocks/virtual.py @@ -18,10 +18,12 @@ class VirtualSink(Block): key = 'virtual_sink' label = 'Virtual Sink' + flags = Block.flags + flags.set('cpp') parameters_data = build_params( params_raw=[dict(label='Stream ID', id='stream_id', dtype='stream_id')], - have_inputs=False, have_outputs=False, flags=Block.flags, block_id=key + have_inputs=False, have_outputs=False, flags=flags, block_id=key ) inputs_data = [dict(domain='stream', dtype='', direction='sink', id="0")] @@ -40,10 +42,12 @@ class VirtualSource(Block): key = 'virtual_source' label = 'Virtual Source' + flags = Block.flags + flags.set('cpp') parameters_data = build_params( params_raw=[dict(label='Stream ID', id='stream_id', dtype='stream_id')], - have_inputs=False, have_outputs=False, flags=Block.flags, block_id=key + have_inputs=False, have_outputs=False, flags=flags, block_id=key ) outputs_data = [dict(domain='stream', dtype='', direction='source', id="0")] -- cgit v1.2.3