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"
31 template <class _Key> class set {};
37 %template(StringMap) std::map<std::string, std::string>;
40 std::map<std::string, std::shared_ptr<sigrok::Driver> >;
41 %template(InputFormatMap)
42 std::map<std::string, std::shared_ptr<sigrok::InputFormat> >;
43 %template(OutputFormatMap)
44 std::map<std::string, std::shared_ptr<sigrok::OutputFormat> >;
46 %template(HardwareDeviceVector)
47 std::vector<std::shared_ptr<sigrok::HardwareDevice> >;
49 %template(DeviceVector)
50 std::vector<std::shared_ptr<sigrok::Device> >;
52 %template(ChannelVector)
53 std::vector<std::shared_ptr<sigrok::Channel> >;
55 %template(ChannelGroupMap)
56 std::map<std::string, std::shared_ptr<sigrok::ChannelGroup> >;
58 /* Workaround for SWIG bug. The vector template instantiation
59 isn't needed but somehow fixes a bug that stops the wrapper
60 for the map instantiation from compiling. */
61 %template(ConfigVector)
62 std::vector<const sigrok::ConfigKey *>;
65 std::map<const sigrok::ConfigKey *, Glib::VariantBase>;
68 std::set<const sigrok::ConfigKey *>;
70 /* Workaround for SWIG bug. The vector template instantiation
71 isn't needed but somehow fixes a bug that stops the wrapper
72 for the set instantiation from compiling. */
73 %template(CapabilityVector)
74 std::vector<const sigrok::Capability *>;
76 %template(CapabilitySet)
77 std::set<const sigrok::Capability *>;
79 %template(OptionVector)
80 std::vector<std::shared_ptr<sigrok::Option> >;
82 std::map<std::string, std::shared_ptr<sigrok::Option> >;
84 %template(VariantVector)
85 std::vector<Glib::VariantBase>;
87 std::map<std::string, Glib::VariantBase>;
89 %template(QuantityFlagVector)
90 std::vector<const sigrok::QuantityFlag *>;
92 %template(TriggerStageVector)
93 std::vector<std::shared_ptr<sigrok::TriggerStage> >;
95 %template(TriggerMatchVector)
96 std::vector<std::shared_ptr<sigrok::TriggerMatch> >;