aboutsummaryrefslogtreecommitdiff
path: root/pd/Atom.cs
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2006-01-14 02:34:17 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2006-01-14 02:34:17 +0000
commitaf0a9de91583557786cdfeca37c36b8e5656fb23 (patch)
tree8ed7ba356a7bff2e6218aaecb703ad46f970623d /pd/Atom.cs
parentca171c73936072e5be30444440b45d3fcf65b68b (diff)
outlet ready, multi-instance, split assembly in 2
svn path=/trunk/externals/clr/; revision=4401
Diffstat (limited to 'pd/Atom.cs')
-rwxr-xr-xpd/Atom.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/pd/Atom.cs b/pd/Atom.cs
new file mode 100755
index 0000000..7e0affa
--- /dev/null
+++ b/pd/Atom.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Runtime.InteropServices; // for structures
+
+namespace PureData
+{
+ public enum AtomType {Null = 0, Float=1, Symbol=2, List=3, Bang=4};
+
+ //[StructLayout (LayoutKind.Explicit)]
+ [StructLayout (LayoutKind.Sequential)]
+ public struct Atom
+ {
+ public AtomType type;
+ public float float_value;
+ public string string_value;
+ public Atom(float f)
+ {
+ this.type = AtomType.Float;
+ this.float_value = f;
+ this.string_value = "float";
+ }
+ public Atom(string s)
+ {
+ this.type = AtomType.Symbol;
+ this.float_value = 0;
+ this.string_value = s;
+ }
+ }
+} \ No newline at end of file