PageRenderTime 22ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/li_std_set.i

#
Swig | 34 lines | 14 code | 10 blank | 10 comment | 0 complexity | e7db0b956e40f2e58bae5e9fc86a4e86 MD5 | raw file
 1/*
 2 * a test of set containers. 
 3 * Languages should define swig::LANGUAGE_OBJ to be
 4 * an entity of their native pointer type which can be
 5 * included in a STL container.
 6 *
 7 * For example:
 8 *   swig::LANGUAGE_OBJ  is  GC_VALUE in Ruby
 9 *   swig::LANGUAGE_OBJ  is  SwigPtr_PyObject in python
10 */
11
12%module li_std_set
13
14%include <std_string.i>
15%include <std_set.i>
16%include <std_multiset.i>
17%include <std_vector.i>
18
19%template(set_string) std::set<std::string>;
20%template(set_int) std::multiset<int>;
21
22
23%template(v_int) std::vector<int>;
24
25
26
27
28#if defined(SWIGRUBY)
29%template(LanguageSet) std::set<swig::LANGUAGE_OBJ>; 
30#endif
31
32#if defined(SWIGPYTHON)
33%template(pyset) std::set<swig::SwigPtr_PyObject>; 
34#endif