Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Representations/Behavior/BallHandling.h

Go to the documentation of this file.
00001 /**
00002 * @file BallHandling.h
00003 *
00004 * Declaration of class BallHandling
00005 *
00006 * @author <a href="mailto:Thorsten.Kerkhof@udo.edu">Thorsten Kerkhof</a>
00007 */
00008 
00009 #ifndef __BallHandling_h_
00010 #define __BallHandling_h_
00011 
00012 #include "Tools/Streams/Streamable.h"
00013 
00014 /**
00015  * @class BallHandling
00016  *
00017  * Gives information from the behavior to other modules about the actual
00018  * handling of the ball.
00019  */
00020 class BallHandling : public Streamable
00021 {
00022 public:
00023   //Constructor:
00024   BallHandling()
00025   {
00026     behaviorBallState = this->notHandlingTheBall;
00027   }
00028 
00029   //The ball behavior state:
00030   enum BehaviorBallState
00031   {
00032     notHandlingTheBall,   /* no ball handling at the moment */
00033     handlingTheBall,      /* behavior handles the ball but without more infos */
00034     performingAKick,      /* behavior kicks the ball */
00035     dribbleTheBall,       /* behavior dribbles the ball */
00036     goToInterceptionPoint /* behavior is going to interception point */
00037   };
00038   BehaviorBallState behaviorBallState;
00039 
00040   //Streaming:
00041   virtual void serialize(In *in, Out *out)
00042   {
00043     STREAM_REGISTER_BEGIN();
00044     if ( in)
00045     {
00046       STREAM_ENUMASINT_EXT( *in, behaviorBallState);
00047     }
00048     else
00049     {
00050       STREAM_ENUMASINT_EXT( *out, behaviorBallState);
00051     }
00052     STREAM_REGISTER_FINISH();
00053   }
00054 };
00055 
00056 #endif //__BallHandling_h_

Generated on Mon Mar 20 22:00:01 2006 for GT2005 by doxygen 1.3.6