X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fcxx%2Fclasses.cpp;h=357c9d6f3cbccac46f24a7d1c74025c525b40324;hb=81b3ce374c3b6d48e5ed321ac7a871ce4248a0bb;hp=a08def8eebaed63d6482ffc17c5d6970da3bf2c5;hpb=176c7219bbb509d8e3e149315db7db6bd2fb9655;p=libsigrok.git diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index a08def8e..357c9d6f 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1565,10 +1565,28 @@ shared_ptr OutputFormat::create_output( Output::Deleter()); } +shared_ptr OutputFormat::create_output(string filename, + shared_ptr device, map options) +{ + return shared_ptr( + new Output(filename, shared_from_this(), device, options), + Output::Deleter()); +} + Output::Output(shared_ptr format, shared_ptr device, map options) : UserOwned(sr_output_new(format->_structure, - map_to_hash_variant(options), device->_structure)), + map_to_hash_variant(options), device->_structure, NULL)), + _format(format), + _device(device), + _options(options) +{ +} + +Output::Output(string filename, shared_ptr format, + shared_ptr device, map options) : + UserOwned(sr_output_new(format->_structure, + map_to_hash_variant(options), device->_structure, filename.c_str())), _format(format), _device(device), _options(options)