Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / share / swig / 1.3.26 / csharp / enums.swg
CommitLineData
920dae64
AT
1/* -----------------------------------------------------------------------------
2 * Include this file in order for C/C++ enums to be wrapped by proper C# enums.
3 * Note that the PINVOKE layer handles the enum as an int.
4 * ----------------------------------------------------------------------------- */
5
6// const enum SWIGTYPE & typemaps
7%typemap(ctype) const enum SWIGTYPE & "int"
8%typemap(imtype) const enum SWIGTYPE & "int"
9%typemap(cstype) const enum SWIGTYPE & "$*csclassname"
10
11%typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
12%{ temp = ($*1_ltype)$input;
13 $1 = &temp; %}
14%typemap(out) const enum SWIGTYPE & %{ $result = *$1; %}
15
16%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
17
18%typemap(throws, canthrow=1) const enum SWIGTYPE & %{
19 (void)$1;
20 SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
21 return $null;
22%}
23
24%typemap(csin) const enum SWIGTYPE & "(int)$csinput"
25%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
26 $*csclassname ret = ($*csclassname)$imcall;$excode
27 return ret;
28 }
29
30%typemap(csvarout, excode=SWIGEXCODE2) const enum SWIGTYPE & %{
31 get {
32 $*csclassname ret = ($*csclassname)$imcall;$excode
33 return ret;
34 } %}
35
36
37// enum SWIGTYPE typemaps
38%typemap(ctype) enum SWIGTYPE "int"
39%typemap(imtype) enum SWIGTYPE "int"
40%typemap(cstype) enum SWIGTYPE "$csclassname"
41
42%typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
43%typemap(out) enum SWIGTYPE %{ $result = $1; %}
44
45%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
46
47%typemap(throws, canthrow=1) enum SWIGTYPE %{
48 (void)$1;
49 SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
50 return $null;
51%}
52
53%typemap(csin) enum SWIGTYPE "(int)$csinput"
54%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
55 $csclassname ret = ($csclassname)$imcall;$excode
56 return ret;
57 }
58
59%typemap(csvarout, excode=SWIGEXCODE2) enum SWIGTYPE %{
60 get {
61 $csclassname ret = ($csclassname)$imcall;$excode
62 return ret;
63 } %}
64
65%typemap(csbase) enum SWIGTYPE ""
66%typemap(csclassmodifiers) enum SWIGTYPE "public enum"
67%typemap(cscode) enum SWIGTYPE ""
68%typemap(csimports) enum SWIGTYPE ""
69%typemap(csinterfaces) enum SWIGTYPE ""
70
71%typemap(csbody) enum SWIGTYPE ""
72
73%csenum(proper);
74