// SWIG typemaps for std::string
/* ------------------------------------------------------------------------
Typemaps for std::string and const std::string&
These are mapped to a C# String and are passed around by value.
To use non-const std::string references use the following %apply. Note
that they are passed by value.
%apply const std::string & {std::string &};
------------------------------------------------------------------------ */
%typemap(ctype) string "char *"
%typemap(imtype) string "string"
%typemap(cstype) string "string"
%typemap(in, canthrow=1) string
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
$1 = std::string($input); %}
%typemap(out) string %{ $result = SWIG_csharp_string_callback($1.c_str()); %}
%typemap(csin) string "$csinput"
%typemap(csout, excode=SWIGEXCODE) string {
string ret = $imcall;$excode
%typemap(csvarin, excode=SWIGEXCODE2) string %{
%typemap(csvarout, excode=SWIGEXCODE2) string %{
string ret = $imcall;$excode
%typemap(typecheck) string = char *;
%typemap(throws, canthrow=1) string %{
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());
%typemap(ctype) const string & "char *"
%typemap(imtype) const string & "string"
%typemap(cstype) const string & "string"
%typemap(in, canthrow=1) const string &
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
std::string $1_str($input);
%typemap(out) const string & %{ $result = SWIG_csharp_string_callback($1->c_str()); %}
%typemap(csin) const string & "$csinput"
%typemap(csout, excode=SWIGEXCODE) const string & {
string ret = $imcall;$excode
%typemap(csvarin, excode=SWIGEXCODE2) const string & %{
%typemap(csvarout, excode=SWIGEXCODE2) const string & %{
string ret = $imcall;$excode
%typemap(typecheck) const string & = char *;
%typemap(throws, canthrow=1) const string & %{
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());