X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fcxx%2Fclasses.cpp;h=ed89b8bd60f55d16378e5b0e8cfd6916e3e33e44;hb=43942280bb42a1dd82957aa582fd43d6e2e5dc96;hp=edd68bd451e7e0074c0fed47c043d9901ed0e89b;hpb=6e5240f418a8e021a8d1272b6255a8c0f10b5af6;p=libsigrok.git diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index edd68bd4..ed89b8bd 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1128,6 +1128,19 @@ string InputFormat::get_description() return valid_string(sr_input_description_get(structure)); } +map> InputFormat::get_options() +{ + const struct sr_option *option = sr_input_options_get(structure); + auto option_array = shared_ptr( + option, [=](const struct sr_option *) { + sr_input_options_free(structure); }); + map> result; + for (; option->id; option++) + result[option->id] = shared_ptr