Author: ArcRiley Date: 2008-09-03 04:36:20 -0400 (Wed, 03 Sep 2008) New Revision: 1352
Added: trunk/pysoy/src/actions/Print.pym Removed: trunk/pysoy/src/actions/Stdout.pym Modified: trunk/pysoy/include/soy.actions.pxd trunk/pysoy/src/actions/Callback.pym trunk/pysoy/src/actions/Force.pym trunk/pysoy/src/actions/Quit.pym trunk/pysoy/src/actions/Torque.pym trunk/pysoy/src/actions/soy.actions.pyx Log: No Ticket : * further docs and cleanup for soy.actions * renamed soy.actions.Stdout to soy.actions.Print to prep for Python3.0 API Modified: trunk/pysoy/include/soy.actions.pxd =================================================================== --- trunk/pysoy/include/soy.actions.pxd 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/include/soy.actions.pxd 2008-09-03 08:36:20 UTC (rev 1352) @@ -25,16 +25,16 @@ # C Functions cdef void _perform ( self, unsigned int ) +cdef class Callback (Action) : + cdef object _callback + cdef class Force (Action) : cdef soy.bodies.Body _target cdef soy.atoms.Vector _vector -cdef class Stdout (Action) : +cdef class Print (Action) : cdef char* _text -cdef class Callback (Action) : - cdef object _callback - cdef class Torque (Action) : cdef soy.bodies.Body _target cdef soy.atoms.Axis _vector Modified: trunk/pysoy/src/actions/Callback.pym =================================================================== --- trunk/pysoy/src/actions/Callback.pym 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/Callback.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -22,7 +22,7 @@ cdef class Callback (Action) : '''soy.actions.Callback - This is a Python function callback action. + This L{action<soy.action.Action>} calls a Python function when activated. @type callback : function @param callback : Python function to be called when action is performed Modified: trunk/pysoy/src/actions/Force.pym =================================================================== --- trunk/pysoy/src/actions/Force.pym 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/Force.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -20,7 +20,8 @@ cdef class Force (Action) : '''soy.actions.Force - Adds velocity to a target L{body<soy.bodies.Body>}. + This L{action<soy.action.Action>} adds linear force (velocity) to a target + L{body<soy.bodies.Body>} when activated. @type target : soy.bodies.Body @param target : Body which force will be applied to Copied: trunk/pysoy/src/actions/Print.pym (from rev 1349, trunk/pysoy/src/actions/Stdout.pym) =================================================================== --- trunk/pysoy/src/actions/Print.pym (rev 0) +++ trunk/pysoy/src/actions/Print.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -0,0 +1,50 @@ +# PySoy's actions.Print class +# +# Copyright (C) 2006,2007,2008 PySoy Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id: Print.pxi 732 2008-01-01 22:37:47Z DavidCzech $ + +cdef class Print (Action) : + '''soy.actions.Print + + This L{action<soy.action.Action>} prints the specified text on activation. + + Note that as of Python 3.0, this class will use the standard print + function which can be overridden for adjustable behavior. + + @type target : string + @param target : Formatted string to be printed + ''' + + ############################################################################ + # + # Python functions + # + + def __cinit__(self, text, *args, **kw) : + self._text = text + + + ############################################################################ + # + # C functions + # + + cdef void _perform(self, unsigned int _duration) : + # + # This will change during the Python 3.0 API update + # + stdio.printf("%s\n", self._text) Property changes on: trunk/pysoy/src/actions/Print.pym ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/pysoy/src/actions/Quit.pym =================================================================== --- trunk/pysoy/src/actions/Quit.pym 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/Quit.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -20,7 +20,7 @@ cdef class Quit (Action) : '''soy.actions.Quit - When called PySoy will quit. There are no arguments to this class. + This L{action<soy.action.Action>} terminates Python when activated. ''' ############################################################################ Deleted: trunk/pysoy/src/actions/Stdout.pym =================================================================== --- trunk/pysoy/src/actions/Stdout.pym 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/Stdout.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -1,42 +0,0 @@ -# PySoy actions.Quit class -# -# Copyright (C) 2006,2007,2008 PySoy Group -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program; if not, see http://www.gnu.org/licenses -# -# $Id: Print.pxi 732 2008-01-01 22:37:47Z DavidCzech $ - -cdef class Stdout (Action): - '''PySoy Print - - When called PySoy will print to stdout. There is an argument for what text to print. - See soy.actions.Action for more information. - ''' - - ############################################################################ - # - # Python functions - # - - def __cinit__(self,text,*args, **kw) : - self._text = text - - - ############################################################################ - # - # C functions - # - - cdef void _perform(self, unsigned int _duration) : - stdio.printf("%s\n", self._text) Modified: trunk/pysoy/src/actions/Torque.pym =================================================================== --- trunk/pysoy/src/actions/Torque.pym 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/Torque.pym 2008-09-03 08:36:20 UTC (rev 1352) @@ -20,7 +20,8 @@ cdef class Torque (Action) : '''soy.actions.Torque - Adds rotational velocity to a target L{body<soy.bodies.Body>}. + This L{action<soy.action.Action>} adds rotational force (torque) to a + target L{body<soy.bodies.Body>} when activated. @type target : soy.bodies.Body @param target : Body which torque will be applied to Modified: trunk/pysoy/src/actions/soy.actions.pyx =================================================================== --- trunk/pysoy/src/actions/soy.actions.pyx 2008-09-03 07:57:06 UTC (rev 1351) +++ trunk/pysoy/src/actions/soy.actions.pyx 2008-09-03 08:36:20 UTC (rev 1352) @@ -21,6 +21,6 @@ include "Action.pym" include "Callback.pym" include "Force.pym" +include "Print.pym" include "Quit.pym" -include "Stdout.pym" include "Torque.pym" _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn