diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2006-01-28 10:36:25 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2006-01-28 10:36:25 +0000 |
commit | 2147d5f788d36ebccb7981c427b7e430b1e4e8cd (patch) | |
tree | 240e2edded8005157f9949476043435a3f0ee79e /pd/Atom.cs | |
parent | 4c9cf49a5d436fbe355405d732290de5c72f17de (diff) |
fixed line endings, now for real
svn path=/trunk/externals/clr/; revision=4513
Diffstat (limited to 'pd/Atom.cs')
-rwxr-xr-x | pd/Atom.cs | 178 |
1 files changed, 89 insertions, 89 deletions
@@ -1,104 +1,104 @@ -using System;
-using System.Runtime.InteropServices; // for structures
-
-namespace PureData
-{
- public enum AtomType {Null = 0, Float = 1, Symbol = 2, Pointer = 3};
+using System; +using System.Runtime.InteropServices; // for structures - [StructLayout (LayoutKind.Sequential)]
+namespace PureData +{ + public enum AtomType {Null = 0, Float = 1, Symbol = 2, Pointer = 3}; + + [StructLayout (LayoutKind.Sequential)] sealed public class Symbol - {
- // this should NOT be public
- readonly private IntPtr ptr;
-
- public Symbol(IntPtr p)
- {
- ptr = p;
- }
-
- public Symbol(Symbol s)
- {
- ptr = s.ptr;
- }
-
- public Symbol(string s)
- {
- ptr = Core.GenSym(s);
- }
-
- override public string ToString()
- {
- return Core.EvalSym(this);
- }
- }
+ { + // this should NOT be public + readonly private IntPtr ptr; + + public Symbol(IntPtr p) + { + ptr = p; + } + + public Symbol(Symbol s) + { + ptr = s.ptr; + } + + public Symbol(string s) + { + ptr = Core.GenSym(s); + } + + override public string ToString() + { + return Core.EvalSym(this); + } + } - [StructLayout (LayoutKind.Sequential)]
+ [StructLayout (LayoutKind.Sequential)] sealed public class Pointer - {
- public IntPtr ptr;
+ { + public IntPtr ptr; } - [StructLayout (LayoutKind.Explicit)]
- public struct Word
- {
- [FieldOffset(0)] public float w_float;
- [FieldOffset(0)] public Symbol w_symbol;
- [FieldOffset(0)] public Pointer w_pointer;
- }
+ [StructLayout (LayoutKind.Explicit)] + public struct Word + { + [FieldOffset(0)] public float w_float; + [FieldOffset(0)] public Symbol w_symbol; + [FieldOffset(0)] public Pointer w_pointer; + } - //[StructLayout (LayoutKind.Explicit)]
- [StructLayout (LayoutKind.Sequential)]
+ //[StructLayout (LayoutKind.Explicit)] + [StructLayout (LayoutKind.Sequential)] sealed public class Atom - {
-
- public AtomType type;
- public Word word;
-
- public Atom(float f)
- {
- type = AtomType.Float;
- word.w_float = f;
- }
-
- public Atom(int i)
- {
- type = AtomType.Float;
- word.w_float = (float)i;
- }
-
- public Atom(Symbol s)
- {
- type = AtomType.Symbol;
- word.w_symbol = s;
- }
-
- public Atom(string s)
- {
- type = AtomType.Symbol;
- word.w_symbol = new Symbol(s);
- }
- }
-
-
- // this struct is relative to this c struct, see clr.c
-
- /*
- // simplyfied atom
- typedef struct atom_simple atom_simple;
+ { + + public AtomType type; + public Word word; + + public Atom(float f) + { + type = AtomType.Float; + word.w_float = f; + } + + public Atom(int i) + { + type = AtomType.Float; + word.w_float = (float)i; + } + + public Atom(Symbol s) + { + type = AtomType.Symbol; + word.w_symbol = s; + } + + public Atom(string s) + { + type = AtomType.Symbol; + word.w_symbol = new Symbol(s); + } + } + + + // this struct is relative to this c struct, see clr.c + + /* + // simplyfied atom + typedef struct atom_simple atom_simple; typedef enum { A_S_NULL=0, A_S_FLOAT=1, A_S_SYMBOL=2, - } t_atomtype_simple;
- typedef struct atom_simple
- {
- t_atomtype_simple a_type;
- union{
+ } t_atomtype_simple; + typedef struct atom_simple + { + t_atomtype_simple a_type; + union{ float float_value; - MonoString *string_value;
- } stuff;
- };
- */
-
+ MonoString *string_value; + } stuff; + }; + */ + }
\ No newline at end of file |