WPILibC++
2027.0.0-alpha-4
Loading...
Searching...
No Matches
PrintCommand.hpp
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#pragma once
6
7
#include <string_view>
8
9
#include "
wpi/commands2/CommandHelper.hpp
"
10
#include "
wpi/commands2/InstantCommand.hpp
"
11
12
namespace
wpi::cmd
{
13
/**
14
* A command that prints a string when initialized.
15
*
16
* This class is provided by the NewCommands VendorDep
17
*/
18
class
PrintCommand
:
public
CommandHelper
<InstantCommand, PrintCommand> {
19
public
:
20
/**
21
* Creates a new a PrintCommand.
22
*
23
* @param message the message to print
24
*/
25
explicit
PrintCommand
(std::string_view message);
26
27
PrintCommand
(
PrintCommand
&& other) =
default
;
28
29
PrintCommand
(
const
PrintCommand
& other) =
default
;
30
31
bool
RunsWhenDisabled
()
const override
;
32
};
33
}
// namespace wpi::cmd
CommandHelper.hpp
InstantCommand.hpp
wpi::cmd::CommandHelper< InstantCommand, PrintCommand >::CommandHelper
CommandHelper()=default
wpi::cmd::PrintCommand::RunsWhenDisabled
bool RunsWhenDisabled() const override
wpi::cmd::PrintCommand::PrintCommand
PrintCommand(const PrintCommand &other)=default
wpi::cmd::PrintCommand::PrintCommand
PrintCommand(std::string_view message)
Creates a new a PrintCommand.
wpi::cmd::PrintCommand::PrintCommand
PrintCommand(PrintCommand &&other)=default
wpi::cmd
Definition
CommandNiDsStadiaController.hpp:15
wpi
commands2
PrintCommand.hpp
Generated on
for WPILibC++ by
1.15.0