Mercurial > hg > soniczoomios
diff eventLogger.h @ 4:7541aeaebcdc
presest store locally. bit crap still though.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 04 Dec 2012 18:36:00 +0000 |
parents | 23efe1f0cd8a |
children | 5ee5ef99e117 |
line wrap: on
line diff
--- a/eventLogger.h Mon Dec 03 18:29:07 2012 +0000 +++ b/eventLogger.h Tue Dec 04 18:36:00 2012 +0000 @@ -12,30 +12,41 @@ #define __oscSenderExample__eventLogger__ +#include "ofMain.h" +#include "ofxiPhone.h" +#include "2dvector.h" +#include "ofxiPhoneExtras.h" +#include <sys/time.h> +#include <iostream> +#include <string> +#include <map> +#include "2dvector.h" +enum leventType {SAVE_PRESET, SAVE_DESET, SCROLL, ZOOM, CHANGE_SLIDER, SWAP_VIEW}; -#include <iostream> -#include "2dvector.h" -enum eventType {PRESET, DESET, SCROLL, ZOOM, SLIDER}; +class lEvent{ -class Event{ // try and make this as compact as possible. - int eventType; // -4 save deset, -3 save preset, -2 zoom, -1 scroll, 0-D slider index + leventType eventType; double val1; // x coord, scale if zoom double val2; // y coord, 0 if zoom + int sliderID; + }; + + class EventLogger{ public: // what we need... /* time, type, value */ - vector<Event> events; + vector<lEvent> theEvents; - int userID; // get something from hardware?? + string userID; // get something from hardware?? EventLogger(); - void logEvent(int evtType,TwoVector centre, double scale); + void logEvent(const leventType& evtType,const TwoVector& centre, const double& scale, const int& sliderID); void sendHttp(); };