Mercurial > hg > soniczoomios
view presetManager.h @ 0:307e5fb699fb
First commit.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 19 Nov 2012 12:56:47 +0000 |
parents | |
children | 43df75088d85 |
line wrap: on
line source
// // presetManager.h // oscSenderExample // // Created by Robert Tubb on 07/11/2012. // // #ifndef __oscSenderExample__presetManager__ #define __oscSenderExample__presetManager__ #include <iostream> #include "ofMain.h" #include "ofxiPhone.h" #include "ofxiPhoneExtras.h" #include "2dvector.h" //--------------------------------------------------------------------------- class Preset{ public: int presetID; string name; TwoVector coordinates; Preset(TwoVector acoord, string aname,int aID){ coordinates = acoord; name = aname; presetID = aID; }; }; //--------------------------------------------------------------------------- class PresetManager{ public: int nextID; // names values // check if already there // find and return all(?) presets within a certain coordinate range vector<Preset *> thePresets; // we want vector ? or list? pointers using new? int addPreset(TwoVector coord, string name); // returns id or negative error number TwoVector recallPreset(int presetID); // by name ? id? TwoVector recallPreset(string name); // by name ? id? vector<TwoVector > getPresetsInRange(TwoVector min, TwoVector max); void startupLoadAll(); // get stuff from XML void exitAndSaveAll(); // save to XML, delete presets array (?) PresetManager(); }; #endif /* defined(__oscSenderExample__presetManager__) */