1 %include <stl.i>
2 %include <std_map.i>
3 %include <std_list.i>
4 
5 %include <std_pair.i>
6 #ifdef SWIGPYTHON
7 %include <std_multimap.i>
8 #else
9 %include "local/std_multimap.i"
10 #endif
11 %include <multimapwdef.h>
12 
13 /*
14 Include SWModule and DirEntry here, so that it will be able to appear below
15 */
16 %{
17 #include "swmodule.h"
18 #include "filemgr.h"
19 #include "swconfig.h"
20 %}
21 
22 /*
23 These are the stl templates that are used throughout Sword. Some have more
24 than one name in Sword, depending on context. However, these are all wrapped with the one class.
25 For example, sword::AttributeValueMap is the same as sword::ConfigEntMap
26 Both are wrapped as the former, however
27 */
28 %inline %{
29 typedef std::map< sword::SWBuf, sword::SWBuf > AttributeValueMap;
30 typedef std::map< sword::SWBuf, AttributeValueMap> AttributeListMap;
31 typedef std::map< sword::SWBuf, AttributeListMap> AttributeTypeListMap;
32 typedef std::multimap < sword::SWBuf, sword::SWBuf, std::less < sword::SWBuf > > PyConfigEntMap;
33 typedef std::map < sword::SWBuf, PyConfigEntMap > PySectionMap;
34 %}
35 
36 /* Used by SWModule and SWConfig */
37 %template() std::pair <sword::SWBuf, sword::SWBuf>;
38 %template(AttributeValueMap) std::map < sword::SWBuf, sword::SWBuf >;
39 
40 /* Used by SWModule */
41 %template() std::pair <sword::SWBuf, AttributeValueMap>;
42 %template(AttributeListMap) std::map < sword::SWBuf, AttributeValueMap>;
43 %template() std::pair < sword::SWBuf, AttributeListMap>;
44 %template(AttributeTypeListMap) std::map < sword::SWBuf, AttributeListMap>;
45 
46 /* Used by SWConfig */
47 #ifdef SWIGPYTHON
48 %template(PyConfigEntMap) std::multimap < sword::SWBuf, sword::SWBuf, std::less <sword::SWBuf> >;
49 #endif
50 /* %template() std::less <sword::SWBuf>;*/
51 %template() std::pair < sword::SWBuf, std::multimap < sword::SWBuf,
52  sword::SWBuf > >/*PyConfigEntMap >*/;
53 %template(PySectionMap) std::map < sword::SWBuf, std::multimap < sword::SWBuf,
54  sword::SWBuf > >/*std::map < sword::SWBuf, PyConfigEntMap >*/;
55 
56 /* Used by SWMgr */
57 %template() std::pair<sword::SWBuf, sword::SWModule*>;
58 %template(ModuleMap) std::map<sword::SWBuf, sword::SWModule*>;
59 
60 /* Used by SWMgr and LocaleMgr */
61 %template(StringVector) std::vector < sword::SWBuf >;
62 
63 /* Used by xmltag */
64 %template(StringList) std::list < sword::SWBuf >;
65 
66 
67 /* Used by InstallMgr */
68 #ifndef EXCLUDE_INSTALLMGR
69 %{
70 #include "installmgr.h"
71 %}
72 %template() std::pair<sword::SWBuf, sword::InstallSource*>;
73 %template(InstallSourceMap) std::map<sword::SWBuf, sword::InstallSource*>;
74 %template() std::pair<sword::SWModule *, int>;
75 %template() std::map<sword::SWModule *, int>;
76 #endif
77 
78 /* Used by DirEntry */
79 %template(DirEntryVector) std::vector < sword::DirEntry > ;
80