[PD-cvs] externals/clr/external External.cs,1.3,1.4 pd.cs,1.3,1.4
dmorelli
morellid at users.sourceforge.net
Fri Jan 13 14:02:24 CET 2006
Update of /cvsroot/pure-data/externals/clr/external
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20621/external
Modified Files:
External.cs pd.cs
Log Message:
single atom ok, no luck with arrays
Index: External.cs
===================================================================
RCS file: /cvsroot/pure-data/externals/clr/external/External.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** External.cs 12 Jan 2006 17:09:45 -0000 1.3
--- External.cs 13 Jan 2006 13:02:22 -0000 1.4
***************
*** 42,46 ****
-
public void Sel1()
{
--- 42,45 ----
***************
*** 93,101 ****
public void SelGenericList(Atom a)
{
! Console.WriteLine("a is type " + a.type);
! Console.WriteLine("float = " + a.float_value);
! Console.WriteLine("stringa = " + a.string_value);
}
/*
public void SelGenericList(Atom [] list)
--- 92,103 ----
public void SelGenericList(Atom a)
{
!
! Console.WriteLine("a is type " + a.type);
! Console.WriteLine("float = " + a.float_value);
! Console.WriteLine("stringa = " + a.string_value);
!
}
+
/*
public void SelGenericList(Atom [] list)
***************
*** 111,119 ****
pd.PostMessage("float = " + a.float_value);
pd.PostMessage("stringa = " + a.string_value);
!
! }
!
}
! */
public int test(int a)
--- 113,119 ----
pd.PostMessage("float = " + a.float_value);
pd.PostMessage("stringa = " + a.string_value);
! }
}
! */
public int test(int a)
Index: pd.cs
===================================================================
RCS file: /cvsroot/pure-data/externals/clr/external/pd.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pd.cs 12 Jan 2006 17:09:45 -0000 1.3
--- pd.cs 13 Jan 2006 13:02:22 -0000 1.4
***************
*** 69,77 ****
*/
! public enum AtomType {Null = 0, Float=1, Symbol=2};
[StructLayout (LayoutKind.Explicit)]
// [StructLayout (LayoutKind.Sequential)]
! public class Atom
{
//[FieldOffset (0)] AtomType type;
--- 69,78 ----
*/
! public enum AtomType {Null = 0, Float=1, Symbol=2, List=3};
+
[StructLayout (LayoutKind.Explicit)]
// [StructLayout (LayoutKind.Sequential)]
! public class Atom2
{
//[FieldOffset (0)] AtomType type;
***************
*** 79,83 ****
[FieldOffset (0)]
public int type;
! /* union members */
[FieldOffset (4)]
public float float_value;
--- 80,84 ----
[FieldOffset (0)]
public int type;
!
[FieldOffset (4)]
public float float_value;
***************
*** 88,93 ****
! public Atom(string string_value)
{
this.type = 2;
--- 89,100 ----
+ public Atom2()
+ {
+ this.type = 0;
+ this.float_value = 0;
+ this.string_value = "";
+ }
! public Atom2(string string_value)
{
this.type = 2;
***************
*** 95,99 ****
this.string_value = string_value;
}
! public Atom(float float_value)
{
this.type = 1;
--- 102,106 ----
this.string_value = string_value;
}
! public Atom2(float float_value)
{
this.type = 1;
***************
*** 102,107 ****
--- 109,123 ----
}
}
+
+ //[StructLayout (LayoutKind.Explicit)]
+ [StructLayout (LayoutKind.Sequential)]
+ public struct Atom
+ {
+ public int type;
+ public float float_value;
+ public string string_value;
+ }
/*
More information about the Pd-cvs
mailing list