v1.3.0.0
exports.h
1/*
2This file is part of the WASimCommander project.
3https://github.com/mpaperno/WASimCommander
4
5COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
6
7This file may be used under the terms of either the GNU General Public License (GPL)
8or the GNU Lesser General Public License (LGPL), as published by the Free Software
9Foundation, either version 3 of the Licenses, or (at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16Copies of the GNU GPL and LGPL are included with this project
17and are available at <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include "global.h"
23
24#if defined(_MSC_VER) && defined(WSMCMND_API_IMPORT)
25
26// This exercise is mainly to silence MSVC warnings (C4251) when exporting (to DLL) some variables which use stdlib templated types.
27// It does not actually make any difference since the produced DLLs are compiler-specific anyway. And we're only exporting
28// very basic vector types which are simply dynamic memory allocation (std::string just being a glorified char array, after all).
29// We could probably just as well disable the warning... but we'll try to do it "the right way."
30//#pragma warning( disable: 4251 )
31
32#include <string>
33#include <vector>
34
35// for string (basic_string<char>)
36WSMCMND_API_IMPORT template class WSMCMND_API std::allocator<char>;
37WSMCMND_API_IMPORT template union WSMCMND_API std::_String_val<std::_Simple_types<char>>::_Bxty;
38WSMCMND_API_IMPORT template class WSMCMND_API std::_String_val<std::_Simple_types<char>>;
39WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<char>,std::_String_val<std::_Simple_types<char>>,true>;
40WSMCMND_API_IMPORT template class WSMCMND_API std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
41// for vector<uint8_t>
42WSMCMND_API_IMPORT template class WSMCMND_API std::allocator<uint8_t>;
43WSMCMND_API_IMPORT template class WSMCMND_API std::_Vector_val<std::_Simple_types<uint8_t>>;
44WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<uint8_t>,std::_Vector_val<std::_Simple_types<uint8_t>>,true>;
45WSMCMND_API_IMPORT template class WSMCMND_API std::vector<uint8_t, std::allocator<uint8_t>>;
46// for vector< pair< int, string > >
47WSMCMND_API_IMPORT template class WSMCMND_API std::_Vector_val<std::_Simple_types<std::pair<int,std::string>>>;
48WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<std::pair<int,std::string>>,std::_Vector_val<std::_Simple_types<std::pair<int,std::string>>>,true>;
49WSMCMND_API_IMPORT template class WSMCMND_API std::vector<std::pair<int,std::string>,std::allocator<std::pair<int,std::string>>>;
50
51#endif