1 |
%module HyperEstraier |
2 |
|
3 |
%include exception.i |
4 |
%include <std/std_except.i> |
5 |
%include "stl.i" |
6 |
|
7 |
%exception { |
8 |
try { |
9 |
$action |
10 |
} catch (const char *msg) { |
11 |
SWIG_exception(SWIG_RuntimeError, msg); |
12 |
} |
13 |
} |
14 |
|
15 |
namespace std { |
16 |
%template(StrVector) std::vector<std::string>; |
17 |
%template(IntVector) std::vector<int>; |
18 |
%template() std::pair<std::string,std::string>; |
19 |
%template(StrStrMap) std::map<std::string,std::string>; |
20 |
}; |
21 |
|
22 |
%newobject Document::get_dump_draft(); |
23 |
%newobject Document::get_attr_names(); |
24 |
%newobject Database::search(); |
25 |
%newobject Database::etch_doc(); |
26 |
%newobject Document::make_snippet(); |
27 |
%newobject Document::texts(); |
28 |
|
29 |
%{ |
30 |
#include "HyperEstraierWrapper.cpp" |
31 |
%} |
32 |
|
33 |
%include "HyperEstraierWrapper.cpp" |