git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
/* -----------------------------------------------------------------------------
|
|
* Include this file in order for C/C++ enums to be wrapped by proper C# enums.
|
|
* Note that the PINVOKE layer handles the enum as an int.
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
%typemap(ctype) enum SWIGTYPE "int"
|
|
%typemap(imtype) enum SWIGTYPE "int"
|
|
%typemap(cstype) enum SWIGTYPE "$csclassname"
|
|
|
|
%typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
|
|
%typemap(out) enum SWIGTYPE %{ $result = $1; %}
|
|
|
|
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
|
|
|
%typemap(throws) enum SWIGTYPE %{
|
|
(void)$1;
|
|
SWIG_CSharpThrowException(SWIG_CSharpException, "C++ $1_type exception thrown");
|
|
%}
|
|
|
|
%typemap(csin) enum SWIGTYPE "(int)$csinput"
|
|
%typemap(csout) enum SWIGTYPE {
|
|
return ($csclassname)$imcall;
|
|
}
|
|
|
|
%typemap(csvarout) enum SWIGTYPE %{
|
|
get {
|
|
return ($csclassname)$imcall;
|
|
} %}
|
|
|
|
%typemap(csbase) enum SWIGTYPE ""
|
|
%typemap(csclassmodifiers) enum SWIGTYPE "public enum"
|
|
%typemap(cscode) enum SWIGTYPE ""
|
|
%typemap(csimports) enum SWIGTYPE ""
|
|
%typemap(csinterfaces) enum SWIGTYPE ""
|
|
|
|
%typemap(csbody) enum SWIGTYPE ""
|
|
|
|
%csenum(proper);
|
|
|