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

Modules/HeadControl/Xabsl2HeadControl.h

Go to the documentation of this file.
00001 /**
00002 * @file Xabsl2HeadControl.h
00003 * 
00004 * Implementation of class Xabsl2HeadControl.
00005 *
00006 * @author Martin Lötzsch
00007 */
00008 
00009 #ifndef __Xabsl2HeadControl_h_
00010 #define __Xabsl2HeadControl_h_
00011 
00012 #include "HeadControl.h"
00013 #include "Tools/Xabsl2/GT/GTXabsl2EngineExecutor.h"
00014 
00015 
00016 /**
00017 * @class Xabsl2HeadControl
00018 *
00019 * Base class for all HeadControl solutions that use a Xabsl2Engine
00020 *
00021 * @author Martin Lötzsch
00022 */ 
00023 class Xabsl2HeadControl : public HeadControl, public GTXabsl2EngineExecutor
00024 {
00025 public:
00026 /** 
00027 * Constructor.
00028 * @param interfaces The paramters of the HeadControl module.
00029 * @param id The id of the Xabsl2Engine.
00030   */
00031   Xabsl2HeadControl(const HeadControlInterfaces& interfaces, 
00032     SolutionRequest::xabsl2EngineID id);
00033   
00034   /** destructor */
00035   ~Xabsl2HeadControl() {};
00036 
00037   /** 
00038   * Is called for every incoming debug message.
00039   * @param message An interface to read the message from the queue
00040   * @return if the messag was read
00041   */
00042   virtual bool handleMessage(InMessage& message);
00043   
00044 protected:
00045 
00046   /** Is called if the engine could not be created */
00047   virtual void executeIfEngineCouldNotBeCreated();
00048 
00049   /** 
00050   * Prints the main action that was generated by the execution of the engine to a string
00051   * @param buf the string where to print the action
00052   */
00053   virtual void printGeneratedMainActionToString(char* buf);
00054 
00055 };
00056 
00057 /**
00058 * Allows to register the same Xabsl2HeadControl instance more than once
00059 * at a ModuleHandler to be able to switch between different agents using the
00060 * GT Module mechanism.
00061 */
00062 class Xabsl2HeadControlAgentInterface : public HeadControl, public Xabsl2NamedItem
00063 {
00064 public:
00065 /**
00066 * Constructor
00067 * @param name The name of the agent
00068 * @param headControl A newly created Xabsl2HeadControl can contains the agent.
00069 * @param interfaces The paramters of the HeadControl module.
00070   */
00071   Xabsl2HeadControlAgentInterface(const char* name,
00072     Xabsl2HeadControl* headControl,
00073     const HeadControlInterfaces& interfaces);
00074   
00075   /** Destructor. Deletes the Xabsl2HeadControl */
00076   ~Xabsl2HeadControlAgentInterface();
00077 
00078   /** Executes the agent */
00079   virtual void execute();
00080   
00081   /** 
00082   * Is called for every incoming debug message.
00083   * @param message An interface to read the message from the queue
00084   * @return if the messag was read
00085   */
00086   virtual bool handleMessage(InMessage& message);
00087   
00088 private:
00089   /** A pointer to the Xabsl2HeadControl can contains the agent. */
00090   Xabsl2HeadControl* headControl;
00091 };
00092 
00093 #endif// __Xabsl2HeadControl_h_
00094 
00095 /*
00096 * Change log :
00097 * 
00098 * $Log: Xabsl2HeadControl.h,v $
00099 * Revision 1.1.1.1  2004/05/22 17:19:23  cvsadm
00100 * created new repository GT2004_WM
00101 *
00102 * Revision 1.1  2004/05/14 11:37:08  loetzsch
00103 * support for multiple xabsl2engines in different modules
00104 * preliminary GT2004HeadControl (does not work at all)
00105 *
00106 */

Generated on Thu Sep 23 19:57:28 2004 for GT2004 by doxygen 1.3.6