From 3e4b264ddb771f7657d6c070599d7c8af3d90f15 Mon Sep 17 00:00:00 2001 From: Davide Morelli Date: Mon, 16 Jan 2006 16:48:18 +0000 Subject: checking in the second example: Counter svn path=/trunk/externals/clr/; revision=4425 --- external/AssemblyInfo.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ external/Counter.cs | 52 +++++++++++++++++++++++++++++++++++++++++++ external/external.sln | 21 ++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100755 external/AssemblyInfo.cs create mode 100755 external/Counter.cs create mode 100755 external/external.sln (limited to 'external') diff --git a/external/AssemblyInfo.cs b/external/AssemblyInfo.cs new file mode 100755 index 0000000..1c62411 --- /dev/null +++ b/external/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/external/Counter.cs b/external/Counter.cs new file mode 100755 index 0000000..7dc8289 --- /dev/null +++ b/external/Counter.cs @@ -0,0 +1,52 @@ +using System; + +namespace PureData +{ + /// + /// Descrizione di riepilogo per Counter. + /// + public class Counter + { + private IntPtr x; + + int curr = 0; + + public Counter() + { + curr = 0; + } + + public Counter(float f) + { + curr = (int) f; + } + + // this function MUST exist + public void SetUp() + { + pd.AddSelector(x, "init", new pd.DelegateFloat(Init)); + pd.AddSelector(x, new pd.DelegateWithoutArguments(SendOut)); + pd.AddSelector(x, new pd.DelegateFloat(Sum)); + pd.AddInlet(x, "init", ParametersType.Float); + pd.AddOutlet(x, ParametersType.Float); + + } + + public void Init(float f) + { + curr = (int) f; + } + + 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/external/external.sln b/external/external.sln new file mode 100755 index 0000000..092ddee --- /dev/null +++ b/external/external.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "external", "external.csproj", "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Debug.ActiveCfg = Debug|.NET + {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Debug.Build.0 = Debug|.NET + {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Release.ActiveCfg = Release|.NET + {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal -- cgit v1.2.1