document directorinattributes and directoroutattributes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11696 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
15070e6d8f
commit
123f4931cd
3 changed files with 27 additions and 2 deletions
|
|
@ -198,6 +198,8 @@ public class runme
|
|||
if (tgv == null)
|
||||
throw new Exception("No attribute for Cymru");
|
||||
}
|
||||
|
||||
// No runtime test for directorinattributes and directoroutattributes
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -256,3 +258,9 @@ public class ThreadSafeAttribute : Attribute {
|
|||
public ThreadSafeAttribute() {}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
|
||||
public class DirectorIntegerOutAttribute : Attribute {}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
|
||||
public class DirectorIntegerInAttribute : Attribute {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%module csharp_attributes
|
||||
%module(directors="1") csharp_attributes
|
||||
|
||||
// Test the inattributes and outattributes typemaps
|
||||
%typemap(cstype, outattributes="[IntOut]", inattributes="[IntIn]") int "int"
|
||||
|
|
@ -50,3 +50,13 @@ enum Cymru { Llanelli };
|
|||
double MoreStations::WestonSuperMare = 0.0;
|
||||
%}
|
||||
|
||||
// Test directorinattributes and directoroutattributes
|
||||
%typemap(imtype, directoroutattributes="[DirectorIntegerOut]", directorinattributes="[DirectorIntegerIn]") int "int"
|
||||
%feature("director") YetMoreStations;
|
||||
|
||||
%inline %{
|
||||
struct YetMoreStations {
|
||||
virtual int Slough(int x) {}
|
||||
virtual ~YetMoreStations() {}
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue