From df8910636a1fe171e48e684cdbaba91ffe97d0aa Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 23 May 2013 16:07:23 +0100 Subject: somewhat cleanup --- interfaces02.h | 142 --------------------------------------------------------- 1 file changed, 142 deletions(-) delete mode 100644 interfaces02.h (limited to 'interfaces02.h') diff --git a/interfaces02.h b/interfaces02.h deleted file mode 100644 index 9960828..0000000 --- a/interfaces02.h +++ /dev/null @@ -1,142 +0,0 @@ -/* -requirement driven design - -do we store graphs as files or in a db with UUID as key? - -do we traverse the graph as direct recursive function calls or programmatically from outside? -or keep a reference to the container graph in each node? - -graph parent; -vector signal_inputs; -vector image_inputs; - -//in input -int input_id; - - -&image get_ouput() -{ - for (int i=0;iget_output(); ///methinks this is neater? you can check pointer for NULL, can't be ref -} - -NO NODE HAS MORE THAN ONE OUTPUT -WE DON'T LINK TO AN OUTPUT OBJECT WE LINK TO THE NODE - GET_OUTPUT IS THE RENDER FUNCTION - -settings - how do we deal with settings being controllable -signal inputs can have a gui representation as well -other gui items don't have an input - -scaling to come - -time is always in floating points seconds - time has to be requested when rendering - either a preview -what about testing a float for equality? -maybe we should look at time in int (frames) - - what does this imply - - - -*/ - -#define ROTOR_READY 0 -#define ROTOR_ANALYSING_AUDIO 1 -#define ROTOR_CREATING_PREVIEW 2 -#define ROTOR_RENDERING 3 - -namespace Rotor { - class Render_status{ - public: - int id; - float progress; - } - class Render_requirements{ - public: - int num_performances; - int num_clips; - } - class Render_context{ //Poco thread object - //manages access to the 'patchbay' - //high level interfaces for the wizard - //and low level interface onto the graph - public: - Render_status get_status(); - void cancel(); //interrupt locking process - int make_preview(int nodeID, float time); //starts a frame preview - returns status code - how to retrieve? - int load_graph(Poco::UUID uid); - Poco::UUID save_graph(); //returns UUID of saved graph - int load_audio(string filename); - Render_requirements get_requirements(); - int load_video(int num,string filename); //can be performance or clip - - private: - int status; - float progress; //for a locking process: audio analysis or rendering - - } - class Graph{ - public: - Poco::UUID uid; //every version of a graph has a UUID - private: - unordered_map nodes; - } - class Input{ - public: - Node* connection; - - }; - class Image_input: public Base_input{ - public: - - }; - class Signal_input: public Base_input{ - public: - - }; - class Node{ - public: - Poco::UUID uid; //every usable node has a UUID - int id; - vector inputs; //simple node has signal inputs and outputs - void gather_inputs(float time) { - for (int i=0;iget_output(); - } - } - virtual &float get_ouput(float time); - - }; - class Image_node: public Node{ - public: - vector image_inputs; //image node also has image inputs and outputs - void gather_inputs(float time) { - for (int i=0;iget_output(); - } - } - &Image get_ouput(float time){ //sample implementation - gather_inputs(); - //do something: i.e - - //and then - return &image_data; - } - void get_preview(float time); - private: - Image* image; //this can be privately allocated or just passed on as the node see fit - float image_time; - }; -} - -/* -coding style -Types begin with a capital, use underscore as a seperator -*/ \ No newline at end of file -- cgit v1.2.3