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

/**
 * inputdata.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 __INPUTDATA_H
#define __INPUTDATA_H

#ifndef __INPUTHARDWAREINFO_H
#include <iwear_input/inputhardwareinfo.h>
#endif

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

namespace iwear {
namespace input {

    /* Forward declaration if InputModule */
    class InputModule;

    /** InputData stores all data which is common to all InputData
     * subclasses.
     */
class InputData
{
public:

    /** Delets the InputData.
     * Does not delete the InputModule and InputHardwareInfo which are
     * referenced by the InputData. The InputModule is managed by the
     * InputManager and the InputHardwareInfo should be reused for all
     * InputDatas which are created by the device.
     */
    virtual ~InputData( void );

    /** Gets the input event type of the InputData.
     * @return The InputEventType of the InputData.
     */
    inline InputEventType get_input_event_type( void ){
	return this->input_event_type;
    }

protected:

    /** The InputModule which created the inputdata object */
    InputModule* input_module;

    /** Information of the hardware that generated the input data
     * object */
    InputHardwareInfo* input_hardware_info;

    /** The type of the event. */
    InputEventType input_event_type;    

    /** Creates a new instance of InputData objects.
     * Since the InputModule has to be set it is safer to use the
     * second constructor.
     */
    InputData();

    /** Creates a new InputData object.
     * @param input_module The InputModule which has created the InputData.
     * @param input_hardware_info Information about the hardware which
     *  has served the InputData.
     */
    InputData(InputModule* input_module, 
	      InputHardwareInfo* input_hardware_info,
	      InputEventType input_event_type );

private: 
};

} // input
} // iwear
#endif	//__INPUTDATA_H

