The problem is that I'm developing a game for Windows Phone 7.1/8/8.1 (With Xna and Visual studio 2012 Express), but I prefer to do every test on my pc as a Windows "desktop" application. It works very fine: I created the project of a shared library so that the changes in the Windows project is seen by Windows phone project.
The only problem is for my input class... With Windows I need to take input from keyboard, with Windows phone from touch. Usually I just commented in/out some pieces of code to test on both platforms. But It's very boring.
So I thought to use heredity, using as base class "InputManager", as derived "KeyboardInput" and "TouchInput".
I would like to instantiate the InputManager class with a preprocessor directive based on which system I am compiling for:
#if WP
input_manager_ = new TouchInput();
#endif
#if Windows
input_manager_= new KeyboardInput();
#endif
But I didn't find googling which are the right directives!