
#ifndef __WFX_INPUT_INPUTABSTRACTOR_H__
#define __WFX_INPUT_INPUTABSTRACTOR_H__

#include <WFX/WFXIncludes.h>

#include <WFX/lang/Singleton.h>
#include <WFX/input/KeyboardListener.h>
#include <WFX/input/MouseListener.h>
#include <WFX/input/JoystickListener.h>

namespace WFX {

    namespace input {

        /**
         * describes an abstract input event
         */
        class AbstractInputEvent {
            public:
                /** event code - defaults to -1 */
                Int Code;

                /** Ctor */
                AbstractInputEvent();
                AbstractInputEvent(Int c);
            protected:
            private:
        };

        /**
         * Abstract class that enables us to define abstract input events
         */
        class InputAbstractor : public WFX::lang::Singleton<InputAbstractor>,
                                public WFX::input::KeyboardListener,
                                public WFX::input::MouseListener,
                                public WFX::input::JoystickListener {
            public:

                /** Ctor/Dtor */
                InputAbstractor();
                virtual ~InputAbstractor();

                /** map a events to an AbstractInputEvent */
                //mapKeyPressed(KeyEvent k, AbstractInputEvent e);
                //mapKeyReleased(KeyEvent k, AbstractInputEvent e);
                
                /** KeyboardListener */
                virtual void keyPressed(KeyEvent k);
                virtual void keyReleased(KeyEvent k);
                /** MouseListener */
                virtual void mouseMoved(MouseMotionEvent e);
                virtual void mouseButtonPressed(MouseButtonEvent e);
                virtual void mouseButtonReleased(MouseButtonEvent e);
                /** JoystickListener */
                virtual void buttonPressed(JoystickButtonEvent e);
                virtual void buttonReleased(JoystickButtonEvent e);
                virtual void axisEvent(JoystickAxisEvent e);

            protected:

            private:
                /** maps */
                std::map<KeyEvent, AbstractInputEvent> KeyPressedMap;
                

        };

    }

}


#endif //include guard


