Lines Matching refs:string
7 * SWIG typemaps for std::string
11 #include <string>
16 %naturalvar string;
18 class string;
22 %typemap(typecheck) string = char *;
23 %typemap(typecheck) const string & = char *;
25 %typemap(in, pikedesc="tStr") string {
27 Pike_error("Bad argument: Expected a string.\n");
28 $1.assign(STR0($input.u.string));
31 %typemap(in, pikedesc="tStr") const string & (std::string temp) {
33 Pike_error("Bad argument: Expected a string.\n");
34 temp.assign(STR0($input.u.string));
38 %typemap(out, pikedesc="tStr") string "push_text($1.c_str());";
40 %typemap(out, pikedesc="tStr") const string & "push_text($1->c_str());";
42 %typemap(directorin) string, const string &, string & "$1_name.c_str()";
44 %typemap(directorin) string *, const string * "$1_name->c_str()";
46 %typemap(directorout) string {
48 $result.assign(STR0($input.u.string));
50 throw Swig::DirectorTypeMismatchException("string expected");
53 %typemap(directorout) const string & (std::string temp) {
55 temp.assign(STR0($input.u.string));
58 throw Swig::DirectorTypeMismatchException("string expected");