From: <sv...@ww...> - 2004-07-11 08:20:56
|
Author: mkrose Date: 2004-07-11 01:20:45 -0700 (Sun, 11 Jul 2004) New Revision: 1156 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/AircraftObject.h trunk/CSP/CSPSim/Include/BaseScreen.h trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Include/InputInterface.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/InputInterface.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp Log: Refactored InputInterface to move the handler maps to a separate class (InputInterfaceDispatch). A static instance of this class is then created in each InputInterface subclass. This means that there will be one set of maps per InputInterface subclass (created once during static intialization), rather than one set per instance (recreated each time a new object was created). The input interface macros have changed somewhat as well. The BIND_* macros that were in the object ctors are now used in the class declaration (c.f. AircraftObject.h). There is also a macro that must be called in the .cpp file to define the static InputInterfaceDispatch instance (c.f. AircraftObject.cpp). The macros used to define static and non-static handlers have been removed. Instead just declare the handlers as normal methods in the class body, and implement them as usual in the source (.cpp) file. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1156 Diff omitted (38809 bytes). |