Added inclusion logic to hooke.plugin
[hooke.git] / hooke / liboutlet.py
index 58edf32b7c2a2d7f164c292fb87a3816adbdb742..aec7a4c07861e5c8782c837473a64fe72c5f07a2 100644 (file)
@@ -4,6 +4,35 @@ Basic outlet object
 Copyright (C) 2008 Alberto Gomez-Casado (University of Twente).
 
 This program is released under the GNU General Public License version 2.
+
+I though of this as just a centralized collector of command output.
+Other option would have been making each command save results, but I
+think that would have led to a lot of code duplication and probably
+huge user hassle (do you want to save this?  and this?  and this
+one?). So there's this object 'outlet' and the only thing each command
+has to know about it is the method outlet.push(line) and the format of
+that line, that so far is
+
+type  filename  [list]
+
+   - type identifies which command produced that line
+   - filename is the curve from which the command produced the output
+(this allows to know for example if a curve had more than one peak,
+but user is left responsible of their ordering!). It's also useful to
+keep track of where were you last time (if you follow natural order
+when looking at curves).
+   - list can have pretty much anything, depending on the particular
+command
+
+From the point of view of the commands there is nothing else about
+outlet. Apart from that I made a couple of commands to delete lines in
+case you had a twitch when click and don what that measurement to be
+saved and to have a look at current contents of outlet.
+
+Finally I put in outlet an attribute, relations, that could be used in
+the future by the viewers to register themselves  so outlet can
+trigger their actions when new data arrives (allowing automatic
+refreshes). But so far that's probably overdesigning.
 '''
 
 import re