// File: joystickinputevent.h
// Created by: <Joern Reimerdes>
// Created on: 25.02.1005

/**
 * inputmodule.h - is part of the iwear-framework
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Input Library
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework 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 General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __JOYSTICKINPUTEVENT_H
#define __JOYSTICKINPUTEVENT_H

#ifndef __JOYSTICKINPUTDATA_H
#include <iwear_input/joystickinputdata.h>
#endif

#ifndef __INPUTENUMS_H
#include <iwear_input/inputenums.h>
#endif

#ifndef __INPUTMODULE_H
#include <iwear_input/inputmodule.h>
#endif

#ifndef __DEBUGSTREAM_H
#include <iwear/debugstream.h>
#endif

#ifndef __EVENTBASE_H
#include <iwear/eventbase.h>
#endif 

#ifndef __FUNCTOR_H
#include <iwear/functor.h>
#endif

#ifndef __UID_H
#include <iwear/uid.h>
#endif

#include <stdint.h>

using namespace iwear;
using namespace iwear::input;

namespace iwear { 
namespace input {
    /** Forward declatation of InputModule. */
    class InputModule;

    /** The JoystickInputEvent will encapsulate all Functor Objects which
     * should be called by the EventDispatcher.
     * @author: Jörn Reimerdes
     * @note: The Functor<JoystickInputData> must be implemented in the
     *  service which should use a joystick input.
     * @inherits The class inhertis from the template class Event
     *  which ist typed with the JoystickInputFunctor class.
     */
    class JoystickInputEvent : public Event<Functor<JoystickInputData> > {

    public:

	/** Creates a new JoystickInputEvent.
	 * @param joystick_input_functor The functor which should be
	 *  called.
	 * @param joystick_input_data The parameter which will be
	 *  passed to the functor.
	 */
	JoystickInputEvent(Functor<JoystickInputData>& joystick_input_functor, 
			   JoystickInputData& joystick_input_data);

	/** Destroys the JoystickInputEvent */
	virtual ~JoystickInputEvent(void){
	}
	
	/* see Event */
	virtual void dispatch( void );

	/* see Event */
	virtual bool is_triggered( void );

    protected:
	
	/**
	 * Reference of the functor which should be called.
	 */
	Functor<JoystickInputData>& joystick_input_functor;

	/** The JoystickInputData reference which contains all data. */
	JoystickInputData joystick_input_data;

    private:
        
    };
} // namespace input
} //namespace iwear

#endif	// __JOYSTICKINPUTEVENT_H

