WPILib 2012
WPILibRoboticsLibraryforFRC
Buttons/ButtonScheduler.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2011. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 
00007 #ifndef __BUTTON_SCHEDULER_H__
00008 #define __BUTTON_SCHEDULER_H__
00009 
00010 class Button;
00011 class Command;
00012 
00013 class ButtonScheduler
00014 {
00015 public:
00016         ButtonScheduler(bool last, Button *button, Command *orders);
00017         virtual ~ButtonScheduler() {}
00018         virtual void Execute() = 0;
00019         void Start();
00020 
00021 protected:
00022         bool m_pressedLast;
00023         Button *m_button;
00024         Command *m_command;
00025 };
00026 
00027 #endif
 All Classes Functions Variables