WPILibC++  2020.3.2
PrintCommand.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2011-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 <string>
11 
12 #include <wpi/Twine.h>
13 
14 #include "frc/commands/InstantCommand.h"
15 
16 namespace frc {
17 
18 class PrintCommand : public InstantCommand {
19  public:
20  explicit PrintCommand(const wpi::Twine& message);
21  virtual ~PrintCommand() = default;
22 
23  PrintCommand(PrintCommand&&) = default;
24  PrintCommand& operator=(PrintCommand&&) = default;
25 
26  protected:
27  virtual void Initialize();
28 
29  private:
30  std::string m_message;
31 };
32 
33 } // namespace frc
frc::PrintCommand
Definition: PrintCommand.h:18
frc::InstantCommand
This command will execute once, then finish immediately afterward.
Definition: InstantCommand.h:24
frc
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
wpi::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:85
frc::PrintCommand::Initialize
virtual void Initialize()
The initialize method is called the first time this Command is run after being started.