Now you can download a copy of these docs so you can use them offline! Download now
CommandGroup.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2011. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef __COMMAND_GROUP_H__
8 #define __COMMAND_GROUP_H__
9 
10 #include "Commands/Command.h"
11 #include "Commands/CommandGroupEntry.h"
12 #include <list>
13 #include <vector>
14 
33 class CommandGroup : public Command
34 {
35 public:
36  CommandGroup();
37  CommandGroup(const char *name);
38  virtual ~CommandGroup();
39 
40  void AddSequential(Command *command);
41  void AddSequential(Command *command, double timeout);
42  void AddParallel(Command *command);
43  void AddParallel(Command *command, double timeout);
44  bool IsInterruptible();
45  int GetSize();
46 
47 protected:
48  virtual void Initialize();
49  virtual void Execute();
50  virtual bool IsFinished();
51  virtual void End();
52  virtual void Interrupted();
53  virtual void _Initialize();
54  virtual void _Interrupted();
55  virtual void _Execute();
56  virtual void _End();
57 
58 private:
59  void CancelConflicts(Command *command);
60 
61  typedef std::vector<CommandGroupEntry> CommandVector;
63  CommandVector m_commands;
64  typedef std::list<CommandGroupEntry> CommandList;
66  CommandList m_children;
68  int m_currentCommandIndex;
69 };
70 
71 #endif
void AddSequential(Command *command)
virtual void End()
virtual void Interrupted()
void AddParallel(Command *command)
virtual void Execute()
virtual void Initialize()
virtual bool IsFinished()

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6