/* * This file is part of the libsigrok project. * * Copyright (C) 2015 Martin Ling * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ %{ #include using namespace std; %} %include "std_string.i" %include "std_shared_ptr.i" %include "std_vector.i" %include "std_map.i" #ifdef SWIGJAVA namespace std { template class set {}; } #else %include "std_set.i" #endif %template(StringMap) std::map; %template(DriverMap) std::map >; %template(InputFormatMap) std::map >; %template(OutputFormatMap) std::map >; %template(HardwareDeviceVector) std::vector >; %template(DeviceVector) std::vector >; %template(ChannelVector) std::vector >; %template(ChannelGroupMap) std::map >; /* Workaround for SWIG bug. The vector template instantiation isn't needed but somehow fixes a bug that stops the wrapper for the map instantiation from compiling. */ %template(ConfigVector) std::vector; %template(ConfigMap) std::map; %template(ConfigSet) std::set; /* Workaround for SWIG bug. The vector template instantiation isn't needed but somehow fixes a bug that stops the wrapper for the set instantiation from compiling. */ %template(CapabilityVector) std::vector; %template(CapabilitySet) std::set; %template(OptionVector) std::vector >; %template(OptionMap) std::map >; %template(VariantVector) std::vector; %template(VariantMap) std::map; %template(QuantityFlagVector) std::vector; %template(TriggerStageVector) std::vector >; %template(TriggerMatchVector) std::vector >;