[PD-cvs] externals/clr/external Counter.cs, 1.1, 1.2 external.csproj, 1.4, 1.5 External.cs, 1.9, NONE

Thomas Grill xovo at users.sourceforge.net
Fri Jan 27 23:51:17 CET 2006


Update of /cvsroot/pure-data/externals/clr/external
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4701

Modified Files:
	Counter.cs external.csproj 
Removed Files:
	External.cs 
Log Message:
Counter external class with new layout, usign virtual functions

--- External.cs DELETED ---

Index: external.csproj
===================================================================
RCS file: /cvsroot/pure-data/externals/clr/external/external.csproj,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** external.csproj	16 Jan 2006 13:02:33 -0000	1.4
--- external.csproj	27 Jan 2006 22:51:15 -0000	1.5
***************
*** 37,41 ****
                      NoWarn = ""
                      Optimize = "false"
!                     OutputPath = "bin\Debug\"
                      RegisterForComInterop = "false"
                      RemoveIntegerChecks = "false"
--- 37,41 ----
                      NoWarn = ""
                      Optimize = "false"
!                     OutputPath = "..\"
                      RegisterForComInterop = "false"
                      RemoveIntegerChecks = "false"
***************
*** 84,87 ****
--- 84,88 ----
                      AssemblyName = "PureData"
                      HintPath = "..\PureData.dll"
+                     Private = "False"
                  />
              </References>
***************
*** 99,107 ****
                      BuildAction = "Compile"
                  />
-                 <File
-                     RelPath = "External.cs"
-                     SubType = "Code"
-                     BuildAction = "Compile"
-                 />
              </Include>
          </Files>
--- 100,103 ----

Index: Counter.cs
===================================================================
RCS file: /cvsroot/pure-data/externals/clr/external/Counter.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Counter.cs	16 Jan 2006 16:48:18 -0000	1.1
--- Counter.cs	27 Jan 2006 22:51:15 -0000	1.2
***************
*** 1,52 ****
  using System;
  
! namespace PureData
  {
! 	/// <summary>
! 	/// Descrizione di riepilogo per Counter.
! 	/// </summary>
! 	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));
! 		}
  
  	}
  }
--- 1,74 ----
  using System;
  
! /// <summary>
! /// Descrizione di riepilogo per Counter.
! /// </summary>
! public class Counter:
! 	PureData.External
  {
! 	public Counter()
  	{
! 		Post("Count");
  
! //        EventFloat += new MethodFloat(MyFloat);
!     }
  
! 	public Counter(PureData.Atom[] args)
! 	{
!         Post("Count with args");
  
! //        pd.AddInlet(x, "init", ParametersType.Float);
! //        pd.AddOutlet(x, ParametersType.Float);
!     }
  
! 	// this function MUST exist
! 	public static void Main()
! 	{
!         Post("Count.Main");       
! 	}
  
! /*
!     public void MyBang() 
!     { 
!         Post("Count-BANG"); 
!     }
  
!     public void MyFloat(float f)
!     {
!         Post(String.Format("Count-FLOAT {0}",f));       
!     }
! */    
!     protected override void MethodBang() 
!     { 
!         Post("Count-BANG"); 
!     }
  
!     protected override void MethodFloat(float f) 
!     { 
!         Post("Count-FLOAT "+f.ToString()); 
!     }
! 
!     protected override void MethodSymbol(PureData.Symbol s) 
!     { 
!         Post("Count-SYMBOL "+s.ToString()); 
!     }
! 
!     /*
! 	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));
  	}
+ 
+ */
  }





More information about the Pd-cvs mailing list