diff presetManager.h @ 3:43df75088d85

fixed sticking scroll more file fiddling
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 03 Dec 2012 18:29:07 +0000
parents 307e5fb699fb
children 7541aeaebcdc
line wrap: on
line diff
--- a/presetManager.h	Tue Nov 27 15:34:51 2012 +0000
+++ b/presetManager.h	Mon Dec 03 18:29:07 2012 +0000
@@ -14,26 +14,52 @@
 #include "ofxiPhone.h"
 #include "ofxiPhoneExtras.h"
 #include "2dvector.h"
+#include "grid.h"
+
 
 //---------------------------------------------------------------------------
 class Preset{
+public:
 
-public:
     int presetID;
     string name;
     TwoVector coordinates;
+    
     Preset(TwoVector acoord, string aname,int aID){
         coordinates = acoord;
         name = aname;
         presetID = aID;
+
+    };
+    Preset(int aID){
+        coordinates.setCoord(0.0,0.0);
+        name = "Blank";
+        presetID = aID;
         
     };
+
 };
+
+
+//---------------------------------------------------------------------------
+inline ostream& operator<<(ostream & os, const Preset& p)
+{
+    os << "Name:" << p.name << "|";
+    os << "Coord:" << p.coordinates << "\n";
+    
+    return(os);
+}
+//---------------------------------------------------------------------------
+inline istream& operator>>(istream & is, Preset& p)
+{
+    //um
+    return(is);
+}
 //---------------------------------------------------------------------------
 class PresetManager{
 public:
     int nextID;
-    
+    int timesOpened;
     // names values
     // check if already there
     // find and return all(?) presets within a certain coordinate range