// File: joystickinputdata.h
// Created by: <Jörn Reimerdes>
// Created on: 22.03.2005

/**
 * joystickinputdata.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 __JOYSTICKINPUTDATA_H
#define __JOYSTICKINPUTDATA_H

#ifndef __INPUTDATA_H
#include <iwear_input/inputdata.h>
#endif

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

#include <bitset>

namespace iwear {
namespace input {

class JoystickInputData : public InputData
{
public:

    /** Value of first axis (x). */
    int32_t first_axis;

    /** Value of second axis (y). */
    int32_t second_axis;

    /** Value of third axis. */
    int32_t third_axis;

    /** Value of fourth axis. */
    int32_t fourth_axis;

    /** A bitset which stores the status of all joystick buttons.
     * Get the joystick button status with: 
     * - <code>joystick_button_status_set[JoystickButton]</code>
     */
    bitset<num_JoystickButton> joystick_button_status_set;

    /** Creates a new instance of JoystickInputData.
     * Do not forget to set the InputModule.
     */
    JoystickInputData();

    /** Creates a new instance of JoystickInputData.
     * @param input_module The InputModule which created the
     *  JoystickInputData.
     * @param input_hardware_info Information about the deveice which
     *  created the JoystickInputData.
     * @param joystick_input_event_type The joystick related input
     *  event type.
     */
    JoystickInputData(InputModule* input_module, 
		      InputHardwareInfo* input_hardware_info,
		      JoystickInputEventType joystick_input_event_type );

    /** Creates a new instance of JoystickInputData.
     * @param input_module The InputModule which created the
     *  JoystickInputData.
     * @param input_hardware_info Information about the deveice which
     *  created the JoystickInputData.
     */
    JoystickInputData(InputModule* input_module, 
		      InputHardwareInfo* input_hardware_info );

    /** Destroys the JoystickInputData.
     */
    ~JoystickInputData();

    /** Gets the joystick input event type .
     * @return The joystick related input event type . */
    inline JoystickInputEventType get_joystick_input_event_type( void ){
	return this->joystick_input_event_type;
    }

    /** The type of the JoystickInputEvent which relates to this data.
     */
    JoystickInputEventType joystick_input_event_type;

protected:


private:

};

} // input
} // iwear

#endif	//__JOYSTICKINPUTDATA_H

