Skip to content

Commit a7cfccc

Browse files
committed
Add initial wrapping for std::set
1 parent 613a815 commit a7cfccc

File tree

6 files changed

+1250
-0
lines changed

6 files changed

+1250
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ target_link_libraries(flc_algorithm flc_random flc)
229229
flibcpp_add_module(flc_random)
230230
target_link_libraries(flc_random flc)
231231

232+
flibcpp_add_module(flc_set)
233+
target_link_libraries(flc_set flc flc_string)
234+
232235
flibcpp_add_module(flc_string)
233236
target_link_libraries(flc_string flc)
234237

include/flc_set.i

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*!
2+
* \file flc_set.i
3+
*
4+
* Copyright (c) 2019 Oak Ridge National Laboratory, UT-Battelle, LLC.
5+
* Distributed under an MIT open source license: see LICENSE for details.
6+
*/
7+
8+
%module "flc_set"
9+
%include "import_flc.i"
10+
%flc_add_header
11+
12+
%include <std_set.i>
13+
14+
/* -------------------------------------------------------------------------
15+
* Numeric sets
16+
* ------------------------------------------------------------------------- */
17+
18+
%template(SetInt) std::set<int>;
19+
20+
%include <std_string.i>
21+
%import "flc_string.i"
22+
23+
/* -------------------------------------------------------------------------
24+
* String sets
25+
* ------------------------------------------------------------------------- */
26+
27+
%template(SetString) std::set<std::string>;

0 commit comments

Comments
 (0)