2 * This file is part of the libsigrok project.
4 * Copyright (C) 2015 Martin Ling <martin-sigrok@earth.li>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <libsigrokcxx/libsigrokcxx.hpp>
25 %include "std_string.i"
26 %include "std_shared_ptr.i"
27 %include "std_vector.i"
30 %template(StringMap) std::map<std::string, std::string>;
33 std::map<std::string, std::shared_ptr<sigrok::Driver> >;
34 %template(InputFormatMap)
35 std::map<std::string, std::shared_ptr<sigrok::InputFormat> >;
36 %template(OutputFormatMap)
37 std::map<std::string, std::shared_ptr<sigrok::OutputFormat> >;
39 %template(HardwareDeviceVector)
40 std::vector<std::shared_ptr<sigrok::HardwareDevice> >;
42 %template(DeviceVector)
43 std::vector<std::shared_ptr<sigrok::Device> >;
45 %template(ChannelVector)
46 std::vector<std::shared_ptr<sigrok::Channel> >;
48 %template(ChannelGroupMap)
49 std::map<std::string, std::shared_ptr<sigrok::ChannelGroup> >;
51 /* Workaround for SWIG bug. The vector template instantiation
52 isn't needed but somehow fixes a bug that stops the wrapper
53 for the map instantiation from compiling. */
54 %template(ConfigVector)
55 std::vector<const sigrok::ConfigKey *>;
57 std::map<const sigrok::ConfigKey *, Glib::VariantBase>;
59 %template(OptionVector)
60 std::vector<std::shared_ptr<sigrok::Option> >;
62 std::map<std::string, std::shared_ptr<sigrok::Option> >;
64 %template(VariantVector)
65 std::vector<Glib::VariantBase>;
67 std::map<std::string, Glib::VariantBase>;
69 %template(QuantityFlagVector)
70 std::vector<const sigrok::QuantityFlag *>;
72 %template(TriggerStageVector)
73 std::vector<std::shared_ptr<sigrok::TriggerStage> >;
75 %template(TriggerMatchVector)
76 std::vector<std::shared_ptr<sigrok::TriggerMatch> >;