From 88ae96ff82ddc836a822a55aef17ea66ca06ac65 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 7 Mar 2006 13:18:32 +0000 Subject: restructured project (MSVC can't cope well with folder/classname mismatch) search for CLR DLLs in PD path first steps to efficient method handling svn path=/trunk/externals/clr/; revision=4656 --- Counter/AssemblyInfo.cs | 58 ++++++++++++++++++++++++++ Counter/Counter.cs | 61 ++++++++++++++++++++++++++++ Counter/Counter.csproj | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ Counter/README.txt | 3 ++ 4 files changed, 227 insertions(+) create mode 100755 Counter/AssemblyInfo.cs create mode 100755 Counter/Counter.cs create mode 100644 Counter/Counter.csproj create mode 100755 Counter/README.txt (limited to 'Counter') diff --git a/Counter/AssemblyInfo.cs b/Counter/AssemblyInfo.cs new file mode 100755 index 0000000..f341568 --- /dev/null +++ b/Counter/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// Le informazioni generali relative a un assembly sono controllate dal seguente +// insieme di attributi. Per modificare le informazioni associate a un assembly +// occorre quindi modificare i valori di questi attributi. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori: +// +// Numero di versione principale +// Numero di versione secondario +// Numero revisione +// Numero build +// +// È possibile specificare tutti i valori o impostare come predefiniti i valori Numero revisione e Numero build +// utilizzando l'asterisco (*) come illustrato di seguito: + +[assembly: AssemblyVersion("1.0.*")] + +// +// Per firmare l'assembly è necessario specificare una chiave da utilizzare. +// Fare riferimento alla documentazione di Microsoft .NET Framework per ulteriori informazioni sulla firma degli assembly. +// +// Utilizzare gli attributi elencati di seguito per verificare la chiave utilizzata per la firma. +// +// Note: +// (*) Se non è specificata alcuna chiave, non sarà possibile firmare l'assembly. +// (*) KeyName fa riferimento a una chiave installata nel provider di servizi di +// crittografia (CSP) sul computer in uso. KeyFile fa riferimento a un file che contiene +// una chiave. +// (*) Se entrambi i valori KeyFile e KeyName sono specificati, si +// verificherà il seguente processo: +// (1) Se KeyName è presente in CSP, verrà utilizzata tale chiave. +// (2) Se KeyName non esiste e KeyFile esiste, la chiave +// di KeyFile verrà installata nel CSP e utilizzata. +// (*) Per creare un KeyFile, è possibile utilizzare l'utilità sn.exe (Strong Name). +// Quando si specifica il KeyFile, il percorso dovrà essere +// relativo alla directory di output del progetto, ovvero +// %Project Directory%\obj\. Se ad esempio il KeyFile si +// trova nella directory del progetto, occorre specificare l'attributo AssemblyKeyFile +// come [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) La firma ritardata è un'opzione avanzata. Vedere la documentazione di Microsoft +// .NET Framework per ulteriori informazioni. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/Counter/Counter.cs b/Counter/Counter.cs new file mode 100755 index 0000000..bf1a9d1 --- /dev/null +++ b/Counter/Counter.cs @@ -0,0 +1,61 @@ +using System; + +/// +/// Descrizione di riepilogo per Counter. +/// +public class Counter: + PureData.External +{ + public Counter(PureData.AtomList args) + { + Post("Count.ctor "+args.ToString()); + +// pd.AddInlet(x, "init", ParametersType.Float); +// pd.AddOutlet(x, ParametersType.Float); + } + + // this function MUST exist + private static void Setup(Counter obj) + { + Add(new MethodBang(obj.MyBang)); + Add(new MethodFloat(obj.MyFloat)); + Add(new MethodSymbol(obj.MySymbol)); + Add(new MethodList(obj.MyList)); + + Post("Count.Main"); + } + + protected virtual void MyBang() + { + Post("Count-BANG"); + } + + protected virtual void MyFloat(float f) + { + Post("Count-FLOAT "+f.ToString()); + } + + protected virtual void MySymbol(PureData.Symbol s) + { + Post("Count-SYMBOL "+s.ToString()); + } + + protected virtual void MyList(PureData.AtomList l) + { + Post("Count-LIST "+l.ToString()); + } + +/* + public void SendOut() + { + pd.SendToOutlet(x, 0, new Atom(curr)); + } + + public void Sum(float f) + { + curr += (int) f; + pd.SendToOutlet(x, 0, new Atom(curr)); + } + +*/ +} diff --git a/Counter/Counter.csproj b/Counter/Counter.csproj new file mode 100644 index 0000000..4502d55 --- /dev/null +++ b/Counter/Counter.csproj @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Counter/README.txt b/Counter/README.txt new file mode 100755 index 0000000..dd2d745 --- /dev/null +++ b/Counter/README.txt @@ -0,0 +1,3 @@ +to compile External.dll put PureData.dll in this folder then execute this command: + +mcs External.cs Counter.cs -out:External.dll -target:library -r:PureData.dll \ No newline at end of file -- cgit v1.2.1