1 | /*
|
2 | * Souffle - A Datalog Compiler
|
3 | * Copyright (c) 2019, The Souffle Developers. All rights reserved
|
4 | * Licensed under the Universal Permissive License v 1.0 as shown at:
|
5 | * - https://opensource.org/licenses/UPL
|
6 | * - <souffle root>/licenses/SOUFFLE-UPL.txt
|
7 | */
|
8 |
|
9 | /************************************************************************
|
10 | *
|
11 | * @file SwigInterface.i
|
12 | *
|
13 | * SWIG interface file that transforms SwigInterface.h to the necessary language and creates a wrapper file
|
14 | * for it
|
15 | *
|
16 | ***********************************************************************/
|
17 |
|
18 | %module SwigInterface
|
19 | %include "std_string.i"
|
20 | %include "std_map.i"
|
21 | %include<std_vector.i>
|
22 | namespace std {
|
23 | %template(map_string_string) map<string, string>;
|
24 | }
|
25 |
|
26 | %{
|
27 | #include "SwigInterface.h"
|
28 | #include <iostream>
|
29 | #include <map>
|
30 | #include <string>
|
31 | #include <vector>
|
32 | using namespace std;
|
33 | souffle::SouffleProgram* prog;
|
34 | souffle::Relation* rel;
|
35 | souffle::Relation* rel_out;
|
36 | %}
|
37 |
|
38 | %include "SwigInterface.h"
|
39 | %newobject newInstance;
|
40 | SWIGSouffleProgram* newInstance(const std::string& name);
|