WPILibC++  2020.3.2
PrintCommand.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2019 FIRST. 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 #pragma once
9 
10 #include <wpi/Twine.h>
11 
12 #include "frc2/command/CommandHelper.h"
13 #include "frc2/command/InstantCommand.h"
14 
15 namespace frc2 {
19 class PrintCommand : public CommandHelper<InstantCommand, PrintCommand> {
20  public:
26  explicit PrintCommand(const wpi::Twine& message);
27 
28  PrintCommand(PrintCommand&& other) = default;
29 
30  PrintCommand(const PrintCommand& other) = default;
31 
32  bool RunsWhenDisabled() const override;
33 };
34 } // namespace frc2
frc2::PrintCommand::RunsWhenDisabled
bool RunsWhenDisabled() const override
Whether the given command should run when the robot is disabled.
frc2::PrintCommand::PrintCommand
PrintCommand(const wpi::Twine &message)
Creates a new a PrintCommand.
frc2::CommandHelper
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26
frc2::PrintCommand
A command that prints a string when initialized.
Definition: PrintCommand.h:19
wpi::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:85