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

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

#
Swig | 55 lines | 37 code | 18 blank | 0 comment | 0 complexity | f58438d607a47ef8e7e8e464187738be MD5 | raw file
 1%module li_std_string_extra
 2
 3%naturalvar A;
 4
 5
 6%include <std_basic_string.i>
 7%include <std_string.i>
 8
 9
10%inline %{
11
12struct A : std::string 
13{
14  A(const std::string& s) : std::string(s)
15  {
16  }
17};
18
19struct B 
20{
21  B(const std::string& s) : cname(0), name(s), a(s)
22  {
23  }
24  
25  char *cname;
26  std::string name;
27  A a;
28
29};
30 
31
32const char* test_ccvalue(const char* x) {
33   return x;
34}
35
36char* test_cvalue(char* x) {
37   return x;
38}
39
40std::basic_string<char> test_value_basic1(std::basic_string<char> x) {
41   return x;
42}
43
44std::basic_string<char,std::char_traits<char> > test_value_basic2(std::basic_string<char,std::char_traits<char> > x) {
45   return x;
46}
47
48std::basic_string<char,std::char_traits<char>,std::allocator<char> > test_value_basic3(std::basic_string<char,std::char_traits<char>,std::allocator<char> > x) {
49   return x;
50}
51
52%}
53
54%include "li_std_string.i"
55