Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/swig4.0/csharp/ |
Upload File : |
/* ----------------------------------------------------------------------------- * std_wstring.i * * Typemaps for std::wstring and const std::wstring& * These are mapped to a C# String and are passed around by value. * * To use non-const std::wstring references use the following %apply. Note * that they are passed by value. * %apply const std::wstring & {std::wstring &}; * ----------------------------------------------------------------------------- */ %include <wchar.i> %{ #include <string> %} namespace std { %naturalvar wstring; class wstring; // wstring %typemap(ctype, out="void *") wstring "wchar_t *" %typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]", outattributes="[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]" ) wstring "string" %typemap(cstype) wstring "string" %typemap(csdirectorin) wstring "$iminput" %typemap(csdirectorout) wstring "$cscall" %typemap(in, canthrow=1) wstring %{ if (!$input) { SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null wstring", 0); return $null; } $1.assign($input); %} %typemap(out) wstring %{ $result = SWIG_csharp_wstring_callback($1.c_str()); %} %typemap(directorout, canthrow=1) wstring %{ if (!$input) { SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null wstring", 0); return $null; } $result.assign($input); %} %typemap(directorin) wstring %{ $input = SWIG_csharp_wstring_callback($1.c_str()); %} %typemap(csin) wstring "$csinput" %typemap(csout, excode=SWIGEXCODE) wstring { string ret = $imcall;$excode return ret; } %typemap(typecheck) wstring = wchar_t *; %typemap(throws, canthrow=1) wstring %{ std::string message($1.begin(), $1.end()); SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str()); return $null; %} // const wstring & %typemap(ctype, out="void *") const wstring & "wchar_t *" %typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]", outattributes="[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]" ) const wstring & "string" %typemap(cstype) const wstring & "string" %typemap(csdirectorin) const wstring & "$iminput" %typemap(csdirectorout) const wstring & "$cscall" %typemap(in, canthrow=1) const wstring & %{ if (!$input) { SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null wstring", 0); return $null; } std::wstring $1_str($input); $1 = &$1_str; %} %typemap(out) const wstring & %{ $result = SWIG_csharp_wstring_callback($1->c_str()); %} %typemap(csin) const wstring & "$csinput" %typemap(csout, excode=SWIGEXCODE) const wstring & { string ret = $imcall;$excode return ret; } %typemap(directorout, canthrow=1, warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const wstring & %{ if (!$input) { SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null wstring", 0); return $null; } /* possible thread/reentrant code problem */ static std::wstring $1_str; $1_str = $input; $result = &$1_str; %} %typemap(directorin) const wstring & %{ $input = SWIG_csharp_wstring_callback($1.c_str()); %} %typemap(csvarin, excode=SWIGEXCODE2) const wstring & %{ set { $imcall;$excode } %} %typemap(csvarout, excode=SWIGEXCODE2) const wstring & %{ get { string ret = $imcall;$excode return ret; } %} %typemap(typecheck) const wstring & = wchar_t *; %typemap(throws, canthrow=1) const wstring & %{ std::string message($1.begin(), $1.end()); SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str()); return $null; %} }