blob: e796299fcba9778e81be3a87ed224872413da664 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2011-2017. 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 the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#include "Commands/WaitForChildren.h"
9
10#include "Commands/CommandGroup.h"
11
12using namespace frc;
13
14WaitForChildren::WaitForChildren(double timeout)
15 : Command("WaitForChildren", timeout) {}
16
17WaitForChildren::WaitForChildren(const std::string& name, double timeout)
18 : Command(name, timeout) {}
19
20bool WaitForChildren::IsFinished() {
21 return GetGroup() == nullptr || GetGroup()->GetSize() == 0;
22}