Changeset 1352

Show
Ignore:
Timestamp:
09/03/08 04:36:20 (3 months ago)
Author:
ArcRiley
Message:

No Ticket :

  • further docs and cleanup for soy.actions
  • renamed soy.actions.Stdout to soy.actions.Print to prep for Python3.0 API
Location:
trunk/pysoy
Files:
6 modified
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/pysoy/include/soy.actions.pxd

    r1351 r1352  
    2626  cdef void                    _perform        ( self, unsigned int ) 
    2727 
     28cdef class Callback (Action) : 
     29  cdef object                  _callback 
     30 
    2831cdef class Force (Action) : 
    2932  cdef soy.bodies.Body         _target 
    3033  cdef soy.atoms.Vector        _vector 
    3134 
    32 cdef class Stdout (Action) : 
     35cdef class Print (Action) : 
    3336  cdef char*                   _text 
    34  
    35 cdef class Callback (Action) : 
    36   cdef object                  _callback 
    3737 
    3838cdef class Torque (Action) : 
  • trunk/pysoy/src/actions/Callback.pym

    r1350 r1352  
    2323  '''soy.actions.Callback 
    2424 
    25     This is a Python function callback action. 
     25    This L{action<soy.action.Action>} calls a Python function when activated. 
    2626 
    2727    @type  callback : function 
  • trunk/pysoy/src/actions/Force.pym

    r1350 r1352  
    2121  '''soy.actions.Force 
    2222 
    23     Adds velocity to a target L{body<soy.bodies.Body>}. 
     23    This L{action<soy.action.Action>} adds linear force (velocity) to a target  
     24    L{body<soy.bodies.Body>} when activated. 
    2425 
    2526    @type  target : soy.bodies.Body 
  • trunk/pysoy/src/actions/Print.pym

    r1225 r1352  
    1 # PySoy actions.Quit class 
     1# PySoy's actions.Print class 
    22# 
    33# Copyright (C) 2006,2007,2008 PySoy Group 
     
    1818# $Id: Print.pxi 732 2008-01-01 22:37:47Z DavidCzech $ 
    1919 
    20 cdef class Stdout (Action): 
    21   '''PySoy Print 
     20cdef class Print (Action) : 
     21  '''soy.actions.Print 
    2222   
    23     When called PySoy will print to stdout. There is an argument for what text to print. 
    24     See soy.actions.Action for more information. 
     23    This L{action<soy.action.Action>} prints the specified text on activation. 
     24 
     25    Note that as of Python 3.0, this class will use the standard print  
     26    function which can be overridden for adjustable behavior. 
     27 
     28    @type  target : string 
     29    @param target : Formatted string to be printed 
    2530  ''' 
    2631 
     
    3035  # 
    3136 
    32   def __cinit__(self,text,*args, **kw) : 
     37  def __cinit__(self, text, *args, **kw) : 
    3338    self._text = text 
    3439 
     
    4045     
    4146  cdef void _perform(self, unsigned int _duration) : 
     47    # 
     48    # This will change during the Python 3.0 API update 
     49    # 
    4250    stdio.printf("%s\n", self._text) 
  • trunk/pysoy/src/actions/Quit.pym

    r1351 r1352  
    2121  '''soy.actions.Quit 
    2222 
    23     When called PySoy will quit.  There are no arguments to this class. 
     23    This L{action<soy.action.Action>} terminates Python when activated. 
    2424  ''' 
    2525 
  • trunk/pysoy/src/actions/Torque.pym

    r1351 r1352  
    2121  '''soy.actions.Torque 
    2222 
    23     Adds rotational velocity to a target L{body<soy.bodies.Body>}. 
     23    This L{action<soy.action.Action>} adds rotational force (torque) to a  
     24    target L{body<soy.bodies.Body>} when activated. 
    2425 
    2526    @type  target : soy.bodies.Body 
  • trunk/pysoy/src/actions/soy.actions.pyx

    r1351 r1352  
    2222include "Callback.pym" 
    2323include "Force.pym" 
     24include "Print.pym" 
    2425include "Quit.pym" 
    25 include "Stdout.pym" 
    2626include "Torque.pym"