aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclr.cpp836
-rwxr-xr-xexternal/Counter.cs16
-rwxr-xr-xexternal/external.csproj212
-rwxr-xr-xpd/Atom.cs282
-rw-r--r--pd/PureData.cs18
-rwxr-xr-xpd/pd.csproj210
6 files changed, 558 insertions, 1016 deletions
diff --git a/clr.cpp b/clr.cpp
index f2797fd..425b2a9 100755
--- a/clr.cpp
+++ b/clr.cpp
@@ -27,697 +27,9 @@ extern "C" {
#include <map>
-#if 0
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//// OLD VERSION
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-#include <time.h>
-#include <math.h>
-
-
-#define MAX_SELECTORS 256
-#define MAX_OUTLETS 32
-
-void *clr_new(t_symbol *s, int argc, t_atom *argv);
-
-typedef struct _clr
-{
- t_object x_obj; // myself
- t_outlet *l_out;
- t_symbol *assemblyname;
- t_symbol *filename;
- int loaded;
- // mono stuff
- MonoAssembly *assembly;
- MonoObject *obj;
- MonoImage *image;
- MonoMethod *method, *setUp, *manageBang, *manageSymbol, *manageFloat, *manageList;
- MonoClass *klass;
- int n;
-
- // TODO: dynamic memory allocation
- selectorList selectors[MAX_SELECTORS];
- outletList outlets[MAX_OUTLETS];
-
-} t_clr;
-
-// list of mono methods
-typedef struct
-{
- char *sel; // the selector
- MonoMethod *func; // the function
- int type;
-// selectorList *next; // next element of the list
-} selectorList;
-
-// list of outlets
-typedef struct
-{
- t_outlet *outlet_pointer;
-// outletList *next; // next element of the list
-} outletList;
-
-// simplyfied atom
-typedef enum
-{
- A_S_NULL=0,
- A_S_FLOAT=1,
- A_S_SYMBOL=2,
-} t_atomtype_simple;
-
-typedef struct
-{
- //t_atomtype_simple a_type;
- int a_type;
- float float_value;
- MonoString *string_value;
-
-} atom_simple;
-
-
-
-
-// mono functions
-
-static void mono_clean(t_clr *x)
-{
- // clean up stuff
- //mono_jit_cleanup (x->domain);
- //mono_domain_free(x->domain);
-}
-
-void registerMonoMethod(void *x, MonoString *selectorString, MonoString *methodString, int type);
-void createInlet(void *x1, MonoString *selectorString, int type);
-void createOutlet(void *x1, int type);
-void out2outlet(void *x1, int outlet, int atoms_length, MonoArray *array);
-void post2pd(MonoString *mesString);
-void error2pd(MonoString *mesString);
-
-
-// load the variables and init mono
-static void mono_load(t_clr *x, int argc, t_atom *argv)
-{
-// const char *file="D:\\Davide\\cygwin\\home\\Davide\\externalTest1.dll";
- //const char *file="External.dll";
-
- MonoMethod *m = NULL, *ctor = NULL, *fail = NULL, *mvalues;
- MonoClassField *classPointer;
- gpointer iter;
- gpointer *args;
- int val;
- int i,j;
- int params;
- t_symbol *strsymbol;
- atom_simple *listparams;
-
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
-
- // prepare the selectors list
- for (i=0; i<MAX_SELECTORS; i++)
- {
- x->selectors[i].sel = 0;
- x->selectors[i].func = 0;
- }
- // and the outlets list
- for (i=0; i<MAX_OUTLETS; i++)
- {
- x->outlets[i].outlet_pointer = 0;
- }
-
- //mono_set_dirs (NULL, NULL);
- //mono_config_parse (NULL);
-
- //mono_jit_init (random_name_str);
-// x->domain = mono_domain_get();
- // all done without errors
- x->loaded = 1;
-
-}
-
-/*
-// call the method
-static void clr_bang(t_clr *x) {
-
- gpointer args [2];
- int val;
- MonoObject *result;
-
- val = x->n;
- args [0] = &val;
-
- if (x->method)
- {
- result = mono_runtime_invoke (x->method, x->obj, args, NULL);
- val = *(int*)mono_object_unbox (result);
- x->n = val;
- // outlet_float(x->l_out, (float) x->n);
- }
-
-
-}
-*/
-
-// finds a method from its name
-void findMonoMethod( MonoClass *klass, char *function_name, MonoMethod **met)
-{
- int trovato;
- MonoMethod *m = NULL;
- gpointer iter;
- iter = NULL;
- while (m = mono_class_get_methods (klass, &iter))
- {
- if (strcmp (mono_method_get_name (m), function_name) == 0)
- {
- *met = m;
-//printf("%s trovata\n", function_name);
- return;
- }
- }
-}
-
-void clr_free(t_clr *x)
-{
- mono_clean(x);
-}
-
-static void clr_method_bang(t_clr *x)
-{
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- if (x->manageBang)
- {
- mono_runtime_invoke (x->manageBang, x->obj, NULL, NULL);
- }
-}
-
-static void clr_method_symbol(t_clr *x, t_symbol *sl)
-{
- gpointer args [1];
- MonoString *strmono;
- strmono = mono_string_new (monodomain, sl->s_name);
- args[0] = &strmono;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- if (x->manageSymbol)
- {
- mono_runtime_invoke (x->manageSymbol, x->obj, args, NULL);
- }
-}
-
-static void clr_method_float(t_clr *x, float f)
-{
- gpointer args [1];
- args [0] = &f;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- if (x->manageFloat)
- {
- mono_runtime_invoke (x->manageFloat, x->obj, args, NULL);
- }
-}
-
-// here i look for the selector and call the right mono method
-static void clr_method_list(t_clr *x, t_symbol *sl, int argc, t_atom *argv)
-{
- gpointer args [2];
- int valInt;
- float valFloat;
-
- int i;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
-
- // check if a selector is present !
- //printf("clr_manage_list, got symbol = %s\n", sl->s_name);
- if (strcmp("list", sl->s_name) == 0)
- {
- printf("lista senza selector");
- if (x->manageList)
- {
- gpointer args [1];
- MonoString *stringtmp;
- double *floattmp;
- t_atomtype_simple *typetmp;
- t_symbol *strsymbol;
- MonoArray *atoms;
- atom_simple *atom_array;
- int j;
- char strfloat[256], strnull[256];
- sprintf(strfloat, "float");
- sprintf(strnull, "null");
- atom_array = malloc(sizeof(atom_simple)*argc);
- atoms = mono_array_new (monodomain, clr_atom, argc);
- for (j=0; j<argc; j++)
- {
- switch ((argv+j)->a_type)
- {
- case A_FLOAT:
- atom_array[j].a_type = A_S_FLOAT;
- atom_array[j].float_value = (double) atom_getfloat(argv+j);
- atom_array[j].string_value = mono_string_new (monodomain, strfloat);
- break;
- case A_SYMBOL:
- atom_array[j].a_type = A_S_SYMBOL;
- strsymbol = atom_getsymbol(argv+j);
- atom_array[j].string_value = mono_string_new (monodomain, strsymbol->s_name);
- atom_array[j].float_value = 0;
- break;
- default:
- atom_array[j].a_type = A_S_NULL;
- atom_array[j].float_value = 0;
- atom_array[j].string_value = mono_string_new (monodomain, strnull);
- }
- mono_array_set (atoms, atom_simple , j, atom_array[j]);
- }
-
- args[0] = atoms;
- mono_runtime_invoke (x->manageList, x->obj, args, NULL);
- return;
- } else
- {
- error("you did not specified a function to call for lists without selectors");
- return;
- }
- }
- for (i=0; i<MAX_SELECTORS; i++)
- {
- if (strcmp(x->selectors[i].sel, sl->s_name) == 0)
- {
- // I've found the selector!
- if (x->selectors[i].func)
- {
- // ParametersType {None = 0, Float=1, Symbol=2, List=3};
- switch (x->selectors[i].type)
- {
- case 0:
- mono_runtime_invoke (x->selectors[i].func, x->obj, NULL, NULL);
- break;
- case 1:
- {
- gpointer args [1];
- float val = atom_getfloat(argv);
- args[0] = &val;
- mono_runtime_invoke (x->selectors[i].func, x->obj, args, NULL);
- break;
- }
- case 2:
- {
- gpointer args [1];
- t_symbol *strsymbol;
- MonoString *strmono;
- strsymbol = atom_getsymbol(argv);
- strmono = mono_string_new (monodomain, strsymbol->s_name);
- args[0] = &strmono;
- mono_runtime_invoke (x->selectors[i].func, x->obj, args, NULL);
- // memory leak ?
- break;
- }
- case 3:
- {
- gpointer args [1];
- MonoString *stringtmp;
- double *floattmp;
- t_atomtype_simple *typetmp;
- t_symbol *strsymbol;
- MonoArray *atoms;
- atom_simple *atom_array;
- int j;
- char strfloat[256], strnull[256];
- sprintf(strfloat, "float");
- sprintf(strnull, "null");
- atom_array = malloc(sizeof(atom_simple)*argc);
- atoms = mono_array_new (monodomain, clr_atom, argc);
- for (j=0; j<argc; j++)
- {
- switch ((argv+j)->a_type)
- {
- case A_FLOAT:
- atom_array[j].a_type = A_S_FLOAT;
- atom_array[j].float_value = (double) atom_getfloat(argv+j);
- atom_array[j].string_value = mono_string_new (monodomain, strfloat);
- break;
- case A_SYMBOL:
- atom_array[j].a_type = A_S_SYMBOL;
- strsymbol = atom_getsymbol(argv+j);
- atom_array[j].string_value = mono_string_new (monodomain, strsymbol->s_name);
- atom_array[j].float_value = 0;
- break;
- default:
- atom_array[j].a_type = A_S_NULL;
- atom_array[j].float_value = 0;
- atom_array[j].string_value = mono_string_new (monodomain, strnull);
- }
- mono_array_set (atoms, atom_simple , j, atom_array[j]);
- }
-
- args[0] = atoms;
- mono_runtime_invoke (x->selectors[i].func, x->obj, args, NULL);
- break;
- }
- }
- return;
- }
- }
- if (x->selectors[i].func == 0)
- i = MAX_SELECTORS;
- }
- error("clr: selector not recognized");
-}
-
-// this function is called by mono when it wants to register a selector callback
-void registerMonoMethod(void *x1, MonoString *selectorString, MonoString *methodString, int type)
-{
-
- char *selCstring, *metCstring;
- MonoMethod *met;
- t_clr *x;
- int this_selector, i;
- //int ret;
-
-
- selCstring = mono_string_to_utf8 (selectorString);
- metCstring = mono_string_to_utf8 (methodString);
-
- x = (t_clr *)x1;
-
- //ret = 0;
- met = 0;
- findMonoMethod( x->klass, metCstring, &met);
-
- if (!met)
- {
- error("method not found!");
- return;
- }
-
- //post("registerMonoMethod: associating %s to %s", selCstring, metCstring);
-
- if (selectorString->length == 0)
- {
- switch (type)
- {
- case 1: // float
- x->manageFloat = met;
- break;
- case 2: // string
- x->manageSymbol = met;
- break;
- case 3: // list
- x->manageList = met;
- break;
- case 4: // bang
- x->manageBang = met;
- break;
- }
- }
-
- this_selector = MAX_SELECTORS;
- for (i = 0; i < MAX_SELECTORS; i++)
- {
- if (x->selectors[i].func == 0)
- {
- // i found the first empty space
- this_selector = i;
- i = MAX_SELECTORS;
- }
-
- }
- if (this_selector == MAX_SELECTORS)
- {
- error("not enough space for selectors! MAX_SELECTORS = %i", MAX_SELECTORS);
- return;
- }
-
- x->selectors[this_selector].sel = selCstring;
- x->selectors[this_selector].func = met;
- x->selectors[this_selector].type = type;
-
- class_addmethod(clr_class, (t_method)clr_method_list, gensym(selCstring), A_GIMME, 0);
-
-
-}
-
-// this function is called by mono when it wants to create a new inlet
-void createInlet(void *x1, MonoString *selectorString, int type)
-{
- // public enum ParametersType {None = 0, Float=1, Symbol=2, List=3, Bang=4, Generic=5};
- char *selCstring;
- char typeString[256];
- t_clr *x;
-
- selCstring = mono_string_to_utf8 (selectorString);
- x = (t_clr *)x1;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- switch (type)
- {
- case 1:
- sprintf(typeString, "float");
- break;
- case 2:
- sprintf(typeString, "symbol");
- break;
- case 3:
- sprintf(typeString, "list");
- break;
- case 4:
- sprintf(typeString, "bang");
- break;
- default:
- sprintf(typeString, "");
- break;
- }
- // create the inlet
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym(typeString), gensym(selCstring));
-}
-
-// this function is called by mono when it wants to create a new outlet
-void createOutlet(void *x1, int type)
-{
- t_clr *x;
- int i = 0;
- char typeString[256];
- x = (t_clr *)x1;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- // public enum ParametersType {None = 0, Float=1, Symbol=2, List=3, Bang=4, Generic=5};
- switch (type)
- {
- case 1:
- sprintf(typeString, "float");
- break;
- case 2:
- sprintf(typeString, "symbol");
- break;
- case 3:
- sprintf(typeString, "list");
- break;
- case 4:
- sprintf(typeString, "bang");
- break;
- default:
- sprintf(typeString, "");
- break;
- }
-
- while (i < MAX_OUTLETS)
- {
- if (x->outlets[i].outlet_pointer == 0)
- {
- // empty space found!
- x->outlets[i].outlet_pointer = outlet_new(&x->x_obj, gensym(typeString));
- return;
- }
- i++;
- }
- error("the maximum number of outlets has been reached (%i)", MAX_OUTLETS);
-
-}
-
-// out to outlet
-void out2outlet(void *x1, int outlet, int atoms_length, MonoArray *array)
-{
- t_clr *x;
- t_atom *lista;
- atom_simple *atoms;
- int n;
- x = (t_clr *)x1;
- if (x->loaded == 0)
- {
- error("assembly not specified");
- return;
- }
- if ((outlet>MAX_OUTLETS) || (outlet<0))
- {
- error("outlet number out of range, max is %i", MAX_OUTLETS);
- return;
- }
- if (x->outlets[outlet].outlet_pointer == 0)
- {
- error("outlet %i not registered", outlet);
- return;
- }
- lista = (t_atom *) malloc(sizeof(t_atom) * atoms_length);
- atoms = (atom_simple *) malloc(sizeof(atom_simple) * atoms_length);
- for (n=0; n<atoms_length; n++)
- {
- char *mesCstring;
- atoms[n] = mono_array_get(array, atom_simple, n);
- switch (atoms[n].a_type)
- {
- case A_S_NULL:
- SETFLOAT(lista+n, (float) 0);
- break;
- case A_S_FLOAT:
- SETFLOAT(lista+n, (float) atoms[n].float_value);
- break;
- case A_S_SYMBOL:
- mesCstring = mono_string_to_utf8 (atoms[n].string_value);
- SETSYMBOL(lista+n, gensym(mesCstring));
- break;
- }
-
- }
- outlet_anything(x->outlets[outlet].outlet_pointer,
- gensym("list") ,
- atoms_length,
- lista);
- free(lista);
-}
-
-// this function is called by mono when it wants post messages to pd
-void post2pd(MonoString *mesString)
-{
-
- char *mesCstring;
- mesCstring = mono_string_to_utf8 (mesString);
- post(mesCstring);
-
-}
-
-// this function is called by mono when it wants to post errors to pd
-void error2pd(MonoString *mesString)
-{
-
- char *mesCstring;
- mesCstring = mono_string_to_utf8 (mesString);
- error(mesCstring);
-}
-/*
-//void ext_class_addbang(const char *funcName)
-void ext_class_addbang(t_method funcName)
-{
-// class_addbang(clr_class, (t_method)clr_bang);
- class_addbang(clr_class, funcName);
-}*/
-
-void *clr_new(t_symbol *s, int argc, t_atom *argv)
-{
-
- int i;
- time_t a;
- t_clr *x = (t_clr *)pd_new(clr_class);
-
- char strtmp[256];
- x->manageBang = 0;
- x->manageSymbol = 0;
- x->manageFloat = 0;
- x->manageList = 0;
-
- if (argc==0)
- {
- x->loaded = 0;
- error("clr: you must provide a class name as the first argument");
- return (x);
- }
- x->loaded = 1;
- x->assemblyname = atom_gensym(argv);
-
- if (argc<2)
- {
- // only main class passed
- // filename by default
- sprintf(strtmp, "%s.dll", x->assemblyname->s_name);
- x->filename = gensym(strtmp);
- printf(" used did not specified filename, I guess it is %s\n", strtmp);
- } else
- {
- x->filename = atom_gensym(argv+1);
- }
-
- x->obj = mono_object_new (monodomain, x->klass);
-
- // load mono, init the needed vars
-// mono_load(x, argc, argv);
- // now call the class constructor
- if (ctor)
- {
- args = malloc(sizeof(gpointer)*params);
- listparams = malloc(sizeof(atom_simple)*params);
- for (j=2; j<argc; j++)
- {
- switch ((argv+j)->a_type)
- {
- case A_FLOAT:
- listparams[j-2].a_type = A_S_FLOAT;
- listparams[j-2].float_value = (double) atom_getfloat(argv+j);
- args[j-2] = &(listparams[j-2].float_value);
- break;
- case A_SYMBOL:
- listparams[j-2].a_type = A_S_SYMBOL;
- strsymbol = atom_getsymbol(argv+j);
- listparams[j-2].string_value = mono_string_new (monodomain, strsymbol->s_name);
- args[j-2] = listparams[j-2].string_value;
- break;
- }
- }
- mono_runtime_invoke (ctor, x->obj, args, NULL);
- free(listparams);
- free(args);
- } else
- {
- error("%s doesn't have a constructor with %i parameters!",x->assemblyname->s_name, params);
- }
-
-
- return (x);
-}
-
-#endif
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//// NEW VERSION
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static MonoDomain *monodomain;
-static MonoClass *clr_atom,*clr_symbol;
-static MonoClassField *clr_symbol_ptr;
-//static MonoMethod *clr_symbol_ctor;
+static MonoClass *clr_symbol,*clr_pointer,*clr_atom,*clr_atomlist;
static MonoMethodDesc *clr_desc_main,*clr_desc_ctor;
static MonoMethodDesc *clr_desc_bang,*clr_desc_float,*clr_desc_symbol,*clr_desc_pointer,*clr_desc_list,*clr_desc_anything;
@@ -756,36 +68,91 @@ typedef struct
static void clr_method_bang(t_clr *x)
{
assert(x && x->clr_clss && x->clr_clss->method_bang);
- mono_runtime_invoke(x->clr_clss->method_bang,x->mono_obj,NULL,NULL);
+ MonoObject *exc;
+ mono_runtime_invoke(x->clr_clss->method_bang,x->mono_obj,NULL,&exc);
+ if(exc) {
+ error("Exception raised");
+ }
}
static void clr_method_float(t_clr *x,t_float f)
{
assert(x && x->clr_clss && x->clr_clss->method_float);
gpointer args = &f;
- mono_runtime_invoke(x->clr_clss->method_float,x->mono_obj,&args,NULL);
+ MonoObject *exc;
+ mono_runtime_invoke(x->clr_clss->method_float,x->mono_obj,&args,&exc);
+ if(exc) {
+ error("Exception raised");
+ }
}
static void clr_method_symbol(t_clr *x,t_symbol *s)
{
assert(x && x->clr_clss && x->clr_clss->method_symbol);
- MonoObject *symobj = mono_object_new(monodomain,clr_symbol);
-// gpointer args = &s;
-// mono_runtime_invoke(clr_symbol_ctor,symobj,&args,NULL);
- // setting the field directly doesn't seem to work?!
- mono_field_set_value(symobj,clr_symbol_ptr,s);
- gpointer args = symobj;
- mono_runtime_invoke(x->clr_clss->method_symbol,x->mono_obj,&args,NULL);
+ MonoObject *symobj = mono_value_box(monodomain,clr_symbol,&s);
+ MonoObject *o = (MonoObject *)mono_object_unbox(symobj);
+ gpointer args = o;
+ MonoObject *exc;
+ mono_runtime_invoke(x->clr_clss->method_symbol,x->mono_obj,&args,&exc);
+ if(exc) {
+ error("Exception raised");
+ }
+}
+
+struct AtomList
+{
+ int argc;
+ t_atom *argv;
+};
+
+static MonoObject *new_AtomList(int argc,t_atom *argv)
+{
+ AtomList al;
+ al.argc = argc;
+ al.argv = argv;
+ MonoObject *lstobj = mono_value_box(monodomain,clr_atomlist,&al);
+ MonoObject *o = (MonoObject *)mono_object_unbox(lstobj);
+ return o;
}
-static void clr_method_list(t_clr *x,int argc, t_atom *argv)
+static MonoArray *new_Atoms(int argc,t_atom *argv)
+{
+ MonoArray *lstobj = mono_array_new(monodomain,clr_atom,argc);
+ t_atom *lstptr = mono_array_addr(lstobj,t_atom,0);
+ memcpy(lstptr,argv,argc*sizeof(t_atom));
+ return lstobj;
+}
+
+static void clr_method_list(t_clr *x,t_symbol *l, int argc, t_atom *argv)
{
assert(x && x->clr_clss && x->clr_clss->method_list);
+
+#if 1
+ // make PureData.AtomList value type
+ MonoObject *lstobj = new_AtomList(argc,argv);
+#else
+ // make PureData.Atom[] array - copy data
+ MonoArray *lstobj = new_Atoms(argc,argv);
+#endif
+ gpointer args = lstobj;
+ MonoObject *exc;
+ mono_runtime_invoke(x->clr_clss->method_list,x->mono_obj,&args,&exc);
+ if(exc) {
+ error("Exception raised");
+ }
}
-static void clr_method_pointer(t_clr *x,t_gpointer *ptr)
+static void clr_method_pointer(t_clr *x,t_gpointer *p)
{
assert(x && x->clr_clss && x->clr_clss->method_pointer);
+ MonoObject *ptrobj = mono_value_box(monodomain,clr_pointer,&p);
+ MonoObject *o = (MonoObject *)mono_object_unbox(ptrobj);
+ gpointer args = o;
+ MonoObject *exc;
+ mono_runtime_invoke(x->clr_clss->method_pointer,x->mono_obj,&args,&exc);
+ if(exc) {
+ error("Exception raised");
+ }
}
static void clr_method_anything(t_clr *x,t_symbol *sl, int argc, t_atom *argv)
@@ -835,15 +202,16 @@ static void PD_PostVerbose(int lvl,MonoString *str)
verbose(lvl,"%s",mono_string_to_utf8(str));
}
-static void *PD_GenSym(MonoString *str)
+static void *PD_SymGen(MonoString *str)
{
- return gensym(mono_string_to_utf8(str));
+ assert(str);
+ t_symbol *s = gensym(mono_string_to_utf8(str));
+ return s;
}
-static MonoString *PD_EvalSym(MonoObject *symobj)
+static MonoString *PD_SymEval(t_symbol *sym)
{
- t_symbol *sym;
- mono_field_get_value(symobj,clr_symbol_ptr,&sym);
+ assert(sym);
return mono_string_new(monodomain,sym->s_name);
}
@@ -930,19 +298,29 @@ void *clr_new(t_symbol *classname, int argc, t_atom *argv)
x->clr_clss = clss;
// store our object pointer in External::ptr member
- mono_field_set_value(x->mono_obj,clss->mono_obj_field,x);
+ mono_field_set_value(x->mono_obj,clss->mono_obj_field,&x);
// ok, we have an object - look for constructor
if(clss->mono_ctor) {
- // call static Main method
- MonoObject *ret = mono_runtime_invoke(clss->mono_ctor,x->mono_obj,NULL,NULL);
+ MonoObject *lstobj = new_AtomList(argc,argv);
+ gpointer args = lstobj;
+ MonoObject *exc;
+
+ // call static constructor
+ MonoObject *ret = mono_runtime_invoke(clss->mono_ctor,x->mono_obj,&args,&exc);
if(ret) {
post("Warning: returned value from %s::.ctor ignored",classname->s_name);
// ??? do we have to mark ret as free?
}
+
+ if(exc) {
+ pd_free((t_pd *)x);
+ error("CLR class %s - exception raised in constructor",classname->s_name);
+ return NULL;
+ }
}
else
- post("Warning: no %s.Main method found",classname);
+ post("Warning: no constructor for class %s found",classname->s_name);
return x;
}
@@ -1051,7 +429,7 @@ static int classloader(char *dirname, char *classname)
// put into map
clr_map[classsym] = clr_class;
- post("Loaded class %s OK",classname);
+// post("Loaded class %s OK",classname);
return 1;
@@ -1097,8 +475,8 @@ void clr_setup(void)
mono_add_internal_call("PureData.Core::PostBug",(const void *)PD_PostBug);
mono_add_internal_call("PureData.Core::PostVerbose",(const void *)PD_PostVerbose);
- mono_add_internal_call("PureData.Core::GenSym", (const void *)PD_GenSym);
- mono_add_internal_call("PureData.Core::EvalSym", (const void *)PD_EvalSym);
+ mono_add_internal_call("PureData.Core::SymGen", (const void *)PD_SymGen);
+ mono_add_internal_call("PureData.Core::SymEval", (const void *)PD_SymEval);
MonoAssembly *assembly = mono_domain_assembly_open (monodomain, "PureData.dll");
@@ -1111,40 +489,38 @@ void clr_setup(void)
assert(image);
// load important classes
- clr_atom = mono_class_from_name(image,"PureData","Atom");
- assert(clr_atom);
clr_symbol = mono_class_from_name(image,"PureData","Symbol");
assert(clr_symbol);
- clr_symbol_ptr = mono_class_get_field_from_name(clr_symbol,"ptr");
- assert(clr_symbol_ptr);
-// MonoMethodDesc *d = mono_method_desc_new("::.ctor(System.IntPtr)",FALSE);
-// assert(d);
-// clr_symbol_ctor = mono_method_desc_search_in_class(d,clr_symbol);
-// assert(clr_symbol_ctor);
-
- clr_desc_main = mono_method_desc_new("::Main",FALSE);
+ clr_pointer = mono_class_from_name(image,"PureData","Pointer");
+ assert(clr_pointer);
+ clr_atom = mono_class_from_name(image,"PureData","Atom");
+ assert(clr_atom);
+ clr_atomlist = mono_class_from_name(image,"PureData","AtomList");
+ assert(clr_atomlist);
+
+ clr_desc_main = mono_method_desc_new("::Main()",FALSE);
assert(clr_desc_main);
- clr_desc_ctor = mono_method_desc_new("::.ctor",FALSE);
+ clr_desc_ctor = mono_method_desc_new("::.ctor(AtomList)",FALSE);
assert(clr_desc_ctor);
- clr_desc_bang = mono_method_desc_new(":MethodBang",FALSE);
+ clr_desc_bang = mono_method_desc_new("::MethodBang()",FALSE);
assert(clr_desc_bang);
- clr_desc_float = mono_method_desc_new(":MethodFloat",FALSE);
+ clr_desc_float = mono_method_desc_new("::MethodFloat(single)",FALSE);
assert(clr_desc_float);
- clr_desc_symbol = mono_method_desc_new(":MethodSymbol",FALSE);
+ clr_desc_symbol = mono_method_desc_new("::MethodSymbol(Symbol)",FALSE);
assert(clr_desc_symbol);
- clr_desc_pointer = mono_method_desc_new(":MethodPointer",TRUE);
+ clr_desc_pointer = mono_method_desc_new("::MethodPointer(Pointer)",FALSE);
assert(clr_desc_pointer);
- clr_desc_list = mono_method_desc_new(":MethodList",TRUE);
+ clr_desc_list = mono_method_desc_new("::MethodList(AtomList)",FALSE);
assert(clr_desc_list);
- clr_desc_anything = mono_method_desc_new(":MethodAnything",TRUE);
+ clr_desc_anything = mono_method_desc_new("::MethodAnything(Symbol,AtomList)",FALSE);
assert(clr_desc_anything);
// install loader hook
sys_loader(classloader);
// ready!
- post("CLR - (c) Davide Morelli, Thomas Grill");
+ post("CLR - (c)2006 Davide Morelli, Thomas Grill");
}
else
error("clr: mono domain couldn't be initialized!");
diff --git a/external/Counter.cs b/external/Counter.cs
index 9ec6ddc..c634f83 100755
--- a/external/Counter.cs
+++ b/external/Counter.cs
@@ -6,16 +6,9 @@ using System;
public class Counter:
PureData.External
{
- public Counter()
+ public Counter(PureData.AtomList args)
{
- Post("Count");
-
-// EventFloat += new MethodFloat(MyFloat);
- }
-
- public Counter(PureData.Atom[] args)
- {
- Post("Count with args");
+ Post("Count.ctor");
// pd.AddInlet(x, "init", ParametersType.Float);
// pd.AddOutlet(x, ParametersType.Float);
@@ -53,6 +46,11 @@ public class Counter:
Post("Count-SYMBOL "+s.ToString());
}
+ protected override void MethodList(PureData.AtomList l)
+ {
+ Post("Count-LIST "+l.ToString());
+ }
+
/*
public void Init(float f)
{
diff --git a/external/external.csproj b/external/external.csproj
index 4efc7fb..3848266 100755
--- a/external/external.csproj
+++ b/external/external.csproj
@@ -1,106 +1,106 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "External"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Library"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "PureData"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "..\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References>
- <Reference
- Name = "System"
- AssemblyName = "System"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.XML"
- AssemblyName = "System.Xml"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
- />
- <Reference
- Name = "PureData"
- AssemblyName = "PureData"
- HintPath = "..\PureData.dll"
- Private = "False"
- />
- </References>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "AssemblyInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Counter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "Counter"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Library"
+ PreBuildEvent = ""
+ PostBuildEvent = ""
+ RootNamespace = "PureData"
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = "..\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+ />
+ <Reference
+ Name = "PureData"
+ AssemblyName = "PureData"
+ HintPath = "..\PureData.dll"
+ Private = "False"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "AssemblyInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Counter.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/pd/Atom.cs b/pd/Atom.cs
index e3b6f3c..d872961 100755
--- a/pd/Atom.cs
+++ b/pd/Atom.cs
@@ -1,104 +1,270 @@
using System;
using System.Runtime.InteropServices; // for structures
+using System.Collections;
+#if NET_2_0
+using System.Collections.Generic;
+#endif
namespace PureData
{
- public enum AtomType {Null = 0, Float = 1, Symbol = 2, Pointer = 3};
-
[StructLayout (LayoutKind.Sequential)]
- sealed public class Symbol
+ public unsafe struct Symbol
{
- // this should NOT be public
- readonly private IntPtr ptr;
-
- public Symbol(IntPtr p)
- {
- ptr = p;
- }
-
- public Symbol(Symbol s)
- {
- ptr = s.ptr;
- }
+ // this should NOT be public (or at least read only)
+ private readonly void *sym;
public Symbol(string s)
{
- ptr = Core.GenSym(s);
+ sym = Core.SymGen(s);
}
-
- override public string ToString()
+
+ public override string ToString()
{
- return Core.EvalSym(this);
+ return Core.SymEval(sym);
}
}
[StructLayout (LayoutKind.Sequential)]
- sealed public class Pointer
+ public unsafe struct Pointer
{
- public IntPtr ptr;
- }
+ private readonly void *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;
+ public override string ToString()
+ {
+ if(sizeof(void *) == 4)
+ return ((int)ptr).ToString();
+ else
+ return ((long)ptr).ToString();
+ }
}
- //[StructLayout (LayoutKind.Explicit)]
[StructLayout (LayoutKind.Sequential)]
- sealed public class Atom
+ public unsafe struct Atom
{
-
- public AtomType type;
- public Word word;
+ private enum AtomType {Null = 0, Float = 1, Symbol = 2, Pointer = 3};
+
+ [StructLayout (LayoutKind.Explicit)]
+ private struct Word
+ {
+ [FieldOffset(0)] public float w_float;
+ [FieldOffset(0)] public Symbol w_sym;
+ [FieldOffset(0)] public Pointer w_ptr;
+ }
+
+ private AtomType type;
+ private Word word;
public Atom(float f)
{
type = AtomType.Float;
+ word = new Word();
word.w_float = f;
}
public Atom(int i)
{
type = AtomType.Float;
+ word = new Word();
word.w_float = (float)i;
}
public Atom(Symbol s)
{
type = AtomType.Symbol;
- word.w_symbol = s;
+ word = new Word();
+ word.w_sym = s;
}
public Atom(string s)
{
type = AtomType.Symbol;
- word.w_symbol = new Symbol(s);
+ word = new Word();
+ word.w_sym = new Symbol(s);
}
- }
-
+
+ public Atom(Pointer p)
+ {
+ type = AtomType.Pointer;
+ word = new Word();
+ word.w_ptr = p;
+ }
+
+ public bool IsFloat { get { return type == AtomType.Float; } }
+ public bool IsSymbol { get { return type == AtomType.Symbol; } }
+ public bool IsPointer { get { return type == AtomType.Pointer; } }
+
+ public float ToFloat()
+ {
+ if(IsFloat)
+ return word.w_float;
+ else
+ throw new System.InvalidCastException("Can't be cast to float.");
+ }
+
+ public Symbol ToSymbol()
+ {
+ if(IsSymbol)
+ return word.w_sym;
+ else
+ throw new System.InvalidCastException("Can't be cast to Symbol.");
+ }
+
+ public Pointer ToPointer()
+ {
+ if(IsPointer)
+ return word.w_ptr;
+ else
+ throw new System.InvalidCastException("Can't be cast to Pointer.");
+ }
+
+ override public string ToString()
+ {
+ if(IsFloat)
+ return word.w_float.ToString();
+ else if(IsSymbol)
+ return word.w_sym.ToString();
+ else if(IsPointer)
+ return word.w_ptr.ToString();
+ else
+ // should never happen
+ throw new System.InvalidProgramException("Internal error.");
+ }
+
+ public static explicit operator float(Atom a)
+ {
+ return a.ToFloat();
+ }
+
+ public static explicit operator Symbol(Atom a)
+ {
+ return a.ToSymbol();
+ }
+
+ public static explicit operator Pointer(Atom a)
+ {
+ return a.ToPointer();
+ }
+ }
- // this struct is relative to this c struct, see clr.c
+ public class AtomListEnum
+ : IEnumerator
+ {
+ public AtomList list;
- /*
- // 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{
- float float_value;
- MonoString *string_value;
- } stuff;
- };
- */
-
-} \ No newline at end of file
+ // Enumerators are positioned before the first element
+ // until the first MoveNext() call.
+ int position = -1;
+
+ public AtomListEnum(AtomList l)
+ {
+ list = l;
+ }
+
+ public bool MoveNext()
+ {
+ return ++position < list.Count;
+ }
+
+ public void Reset()
+ {
+ position = -1;
+ }
+
+ public object Current
+ {
+ get
+ {
+ try
+ {
+ return list[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+ }
+
+
+ // attention: this is dangerous, because we could do the following
+ // AtomList l2 = l;
+ // with l also being an AtomList... the two private memebers will get copied, although atoms is only a temporary reference
+
+ [StructLayout (LayoutKind.Sequential)]
+ unsafe public struct AtomList
+#if NET_2_0
+ : ICollection<Atom>
+#else
+ : ICollection
+#endif
+ {
+ private readonly int len;
+ private readonly Atom *atoms;
+
+ public int Count { get { return len; } }
+#if NET_2_0
+ public bool IsReadOnly { get { return false; } } // member of generic.ICollection<Atom> (C# 2.0)
+#endif
+ public bool IsSynchronized { get { return false; } }
+ public Object SyncRoot { get { return null; } }
+
+ // protect this from being used
+ private AtomList(AtomList a) { len = 0; atoms = null; }
+
+#if NET_2_0
+ public void CopyTo(Atom[] array,int start)
+#else
+ public void CopyTo(Array array,int start)
+#endif
+ {
+ if(len > array.GetUpperBound(0)+1-start)
+ throw new System.ArgumentException("Destination array is not long enough.");
+ int i;
+ for(i = 0; i < len-start; ++i)
+ array.SetValue(atoms[start+i],i);
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return new AtomListEnum(this);
+ }
+
+ public Atom this[int i]
+ {
+ get
+ {
+ if(i < 0 || i >= len)
+ throw new System.IndexOutOfRangeException("Index outside array bounds.");
+ return atoms[i];
+ }
+ set
+ {
+ if(i < 0 || i >= len)
+ throw new System.IndexOutOfRangeException("Index outside array bounds.");
+ atoms[i] = value;
+ }
+ }
+
+#if !NET_2_0
+ public static explicit operator Atom[](AtomList l)
+ {
+ Atom[] ret = new Atom[l.Count];
+ int i;
+ for(i = 0; i < l.Count; ++i) ret[i] = l.atoms[i];
+ return ret;
+ }
+#endif
+
+ override public string ToString()
+ {
+ string n = "{";
+ if(len > 0) {
+ int i;
+ for(i = 0; i < len-1; ++i) n += atoms[i].ToString()+",";
+ n += atoms[i].ToString();
+ }
+ return n+"}";
+ }
+ }
+}
diff --git a/pd/PureData.cs b/pd/PureData.cs
index 2d6cf16..70f3d98 100644
--- a/pd/PureData.cs
+++ b/pd/PureData.cs
@@ -1,10 +1,11 @@
using System;
using System.Runtime.CompilerServices; // for extern import
+using System.Runtime.InteropServices; // for structures
namespace PureData
{
// PD core functions
- public class Core
+ public unsafe class Core
{
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static void Post(string message);
@@ -19,18 +20,19 @@ namespace PureData
public extern static void PostVerbose(string message);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- public extern static IntPtr GenSym(string sym);
+ internal extern static void *SymGen(string sym);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- public extern static string EvalSym(Symbol sym);
+ internal extern static string SymEval(void *sym);
}
// This is the base class for a PD/CLR external
- public class External
+ public unsafe class External
: Core
{
- private readonly IntPtr ptr;
-
+ // PD object pointer
+ private readonly void *ptr;
+
protected virtual void MethodBang() { Post("No bang handler"); }
protected virtual void MethodFloat(float f) { Post("No float handler"); }
@@ -39,8 +41,8 @@ namespace PureData
protected virtual void MethodPointer(Pointer p) { Post("No pointer handler");}
- protected virtual void MethodList(Atom[] lst) { Post("No list handler"); }
+ protected virtual void MethodList(AtomList lst) { Post("No list handler"); }
- protected virtual void MethodAnything(Atom[] lst) { Post("No list handler"); }
+ protected virtual void MethodAnything(Symbol tag,AtomList lst) { Post("No anything handler"); }
}
}
diff --git a/pd/pd.csproj b/pd/pd.csproj
index 29dcf7d..8dd510d 100755
--- a/pd/pd.csproj
+++ b/pd/pd.csproj
@@ -1,105 +1,105 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "PureData"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Library"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "PureData"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "..\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References>
- <Reference
- Name = "System"
- AssemblyName = "System"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.XML"
- AssemblyName = "System.Xml"
- HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
- />
- </References>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "AssemblyInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Atom.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "PureData.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "PureData"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Library"
+ PreBuildEvent = ""
+ PostBuildEvent = ""
+ RootNamespace = "PureData"
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "true"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = "..\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "true"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "AssemblyInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Atom.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "PureData.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+