gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob ./rules.mk doc/design_custominput.rst vo...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob ./rules.mk doc/design_custominput.rst vo...
Date: Sun, 29 Jun 2003 05:25:24 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/06/29 05:25:24

Modified files:
        .              : rules.mk 
        doc            : design_custominput.rst 
        vob            : __init__.py 
Added files:
        org/nongnu/libvob/input: AbsoluteAxisListener.java Axis.java 
                                 AxisListener.java 
                                 BoundedFloatLinearAbsoluteAdapter.java 
                                 BoundedFloatLogAbsoluteAdapter.java 
                                 BoundedFloatModel.java InputDevice.java 
                                 InputDeviceManager.java Model.java 
                                 RelativeAxisListener.java 
                                 boundedfloatmodel.py 
        org/nongnu/libvob/input/impl: AbstractModel.java 
                                      StandardBoundedFloatModel.java 
        test/vob/input : boundedfloatadapters.test 
                         standardboundedfloatmodel.test 

Log message:
        Tests

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/rules.mk.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/design_custominput.rst.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/AbsoluteAxisListener.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/Axis.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/AxisListener.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/BoundedFloatLinearAbsoluteAdapter.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/BoundedFloatLogAbsoluteAdapter.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/BoundedFloatModel.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/InputDevice.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/InputDeviceManager.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/Model.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/RelativeAxisListener.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/boundedfloatmodel.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/impl/AbstractModel.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/input/impl/StandardBoundedFloatModel.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/input/boundedfloatadapters.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/input/standardboundedfloatmodel.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/__init__.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text

Patches:
Index: libvob/doc/design_custominput.rst
diff -u libvob/doc/design_custominput.rst:1.2 
libvob/doc/design_custominput.rst:1.3
--- libvob/doc/design_custominput.rst:1.2       Fri Jun 27 10:22:16 2003
+++ libvob/doc/design_custominput.rst   Sun Jun 29 05:25:24 2003
@@ -2,7 +2,8 @@
 Libvob input framework for custom controllers
 =============================================
 
-How to read controllers built from LEGO(r) bricks.
+How to read joysticks and custom
+controllers built from LEGO(r) bricks.
 
 
 Introduction
@@ -80,77 +81,113 @@
 Design
 ======
 
-First of all, a central class which allows programs to access the currently
-configured input devices: ``InputDeviceManager``. From this class, users may 
get
-instances of the ``InputDevice`` class. This class also contains the methods 
for 
-beginning and ending calibration.
+The ``*Model`` classes are a central piece of the API.
+This is a design similar
+to swing: for each numeric .
 
-The ``InputDevice`` classes again allow users to get the axes. 
+..  UML:: custominput_models
 
-..  UML:: custominput_1
+    class Model "interface"
+       methods
+           addActionListener(...)
+
+    class BoundedFloatModel "interface"
+       inherit Model
+       fields
+           minimum
+           maximum
+           value
+
+    class ModFloatModel "interface"
+       inherit Model
+       fields
+           modulus
+           value
+       methods
+           addActionListener(...)
+
+    ---
+    horizontally(50, xx, BoundedFloatModel, ModFloatModel);
+    vertically(50, xx, Model, xx);
 
-    class InputDeviceManager
 
-    class InputDevice
+There can only be one main model per axis - to not confuse the user.
+If desired, we may later add the capability to put in "non-main"
+listeners, but this is not a priority.
 
-    class Axis
+The input devices, on the other hand, are represented by a central class
+which allows programs to access the currently configured input devices:
+``InputDeviceManager``. From this class, users may get instances of
+the ``InputDevice`` class. This class also contains the methods for
+beginning and ending calibration and choosing axes by moving them.
+The ``InputDevice`` classes again allow users to get the axes.
+
+..  UML:: custominput_inputs
+
+    class InputDeviceManager "interface"
+       fields
+           STATE_CALIBRATING
+           STATE_CHOOSING
+           STATE_NORMAL
        methods
-           void setMainAxisListener()
+           void setState(int state)
+           Axis getCurrentChoice()
+       assoc multi(1) - multi(*) InputDevice
 
-    class AxisListener "interface"
+    class InputDevice "interface"
+       assoc multi(1) - multi(*) Axis
+
+    class Axis "interface"
+       methods
+           getName()
+
+    ---
+    horizontally(60, InputDeviceManager, InputDevice, Axis);
+
+The models are connected to the axes through absolute and relative
+axis listeners:
+
+..  UML:: custominput_adapters
+
+    class Axis "interface"
+       assoc multi(1) - multi(0..1) role(mainListener) AxisListener
        methods
-           void changed(float value)
+           setMainListener(AxisListener l)
+
+    class AxisListener "interface"
+
 
     class AbsoluteAxisListener "interface"
        inherit AxisListener
+       methods
+           void changedAbsolute(float newvalue)
 
     class RelativeAxisListener "interface"
        inherit AxisListener
+       methods
+           void changedRelative(float delta)
 
-    class AbsoluteLinearAxisListener
+    class BoundedFloatLinearAbsoluteAdapter inherit AbsoluteAxisListener
        realize AbsoluteAxisListener
-       fields
-           AbsoluteAxisListener child
-           float min, max
+       dep "use" BoundedFloatModel
 
-    class AbsoluteLogAxisListener
+    class BoundedFloatLogAbsoluteAdapter inherit AbsoluteAxisListener
        realize AbsoluteAxisListener
-       fields
-           AbsoluteAxisListener child
-           float min, max
+       dep "use" BoundedFloatModel
 
-    class FirstDerivativeAxisListener
-       fields
-           AbsoluteAxisListener child 
-           float min, max
-           float value
-           float sensitivity
+    class ModFloatRelativeAdapter inherit RelativeAxisListener
 
-    class RelativeModAxisListener
-       fields
-           AbsoluteAxisListener child
-           float mod
-           float value
+    class BoundedFloatModel "interface"
 
+    class ModFloatModel "interface"
 
-The user end of the picture is handled by the "model" classes: this is a 
design similar
-to swing.
+    ---
 
-    class BoundedFloatModel "interface"
-       fields
-           minimum
-           maximum
-           value
-       methods
-           addActionListener(...)
 
-XXX
 
-There can only be one main axis listener per axis - to not confuse the user. 
-If desired, we may later add the capability to put in "non-main" listeners.
 
-.. vim: set syntax=text
 
-An example use in python code would 
 
 
+
+.. vim: set syntax=text
Index: libvob/rules.mk
diff -u libvob/rules.mk:1.24 libvob/rules.mk:1.25
--- libvob/rules.mk:1.24        Thu Jun  5 06:00:36 2003
+++ libvob/rules.mk     Sun Jun 29 05:25:24 2003
@@ -1,4 +1,4 @@
-GCCVER=3.2
+GCCVER=3.3
 
 .SUFFIXES: $(SUFFIXES) .dep .cxx .vobgenobj .transgenobj .vobdep .transdep 
.vobjniobj .transjniobj .vobgenjni .transgenjni .vobjnidep .transjnidep
 
Index: libvob/vob/__init__.py
diff -u libvob/vob/__init__.py:1.10 libvob/vob/__init__.py:1.11
--- libvob/vob/__init__.py:1.10 Wed Jun 11 13:49:03 2003
+++ libvob/vob/__init__.py      Sun Jun 29 05:25:24 2003
@@ -40,6 +40,7 @@
 
 view = _libvob.view
 impl = _libvob.impl
+input = _libvob.input
 
 del _vob
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]