mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Use llvm::Twine across C++ Command structure.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <llvm/StringRef.h>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Buttons/Button.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
@@ -19,8 +19,9 @@ namespace frc {
|
||||
|
||||
class NetworkButton : public Button {
|
||||
public:
|
||||
NetworkButton(llvm::StringRef tableName, llvm::StringRef field);
|
||||
NetworkButton(std::shared_ptr<nt::NetworkTable> table, llvm::StringRef field);
|
||||
NetworkButton(const llvm::Twine& tableName, const llvm::Twine& field);
|
||||
NetworkButton(std::shared_ptr<nt::NetworkTable> table,
|
||||
const llvm::Twine& field);
|
||||
virtual ~NetworkButton() = default;
|
||||
|
||||
virtual bool Get();
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
#include "Commands/CommandGroupEntry.h"
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace frc {
|
||||
class CommandGroup : public Command {
|
||||
public:
|
||||
CommandGroup() = default;
|
||||
explicit CommandGroup(const std::string& name);
|
||||
explicit CommandGroup(const llvm::Twine& name);
|
||||
virtual ~CommandGroup() = default;
|
||||
|
||||
void AddSequential(Command* command);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
#include "Commands/InstantCommand.h"
|
||||
@@ -33,7 +33,7 @@ namespace frc {
|
||||
class ConditionalCommand : public Command {
|
||||
public:
|
||||
explicit ConditionalCommand(Command* onTrue, Command* onFalse = nullptr);
|
||||
ConditionalCommand(const std::string& name, Command* onTrue,
|
||||
ConditionalCommand(const llvm::Twine& name, Command* onTrue,
|
||||
Command* onFalse = nullptr);
|
||||
virtual ~ConditionalCommand() = default;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace frc {
|
||||
*/
|
||||
class InstantCommand : public Command {
|
||||
public:
|
||||
explicit InstantCommand(const std::string& name);
|
||||
explicit InstantCommand(const llvm::Twine& name);
|
||||
InstantCommand() = default;
|
||||
virtual ~InstantCommand() = default;
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
#include "PIDController.h"
|
||||
@@ -19,10 +20,10 @@ namespace frc {
|
||||
|
||||
class PIDCommand : public Command, public PIDOutput, public PIDSource {
|
||||
public:
|
||||
PIDCommand(const std::string& name, double p, double i, double d);
|
||||
PIDCommand(const std::string& name, double p, double i, double d,
|
||||
PIDCommand(const llvm::Twine& name, double p, double i, double d);
|
||||
PIDCommand(const llvm::Twine& name, double p, double i, double d,
|
||||
double period);
|
||||
PIDCommand(const std::string& name, double p, double i, double d, double f,
|
||||
PIDCommand(const llvm::Twine& name, double p, double i, double d, double f,
|
||||
double period);
|
||||
PIDCommand(double p, double i, double d);
|
||||
PIDCommand(double p, double i, double d, double period);
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Subsystem.h"
|
||||
#include "PIDController.h"
|
||||
@@ -28,9 +29,9 @@ namespace frc {
|
||||
*/
|
||||
class PIDSubsystem : public Subsystem, public PIDOutput, public PIDSource {
|
||||
public:
|
||||
PIDSubsystem(const std::string& name, double p, double i, double d);
|
||||
PIDSubsystem(const std::string& name, double p, double i, double d, double f);
|
||||
PIDSubsystem(const std::string& name, double p, double i, double d, double f,
|
||||
PIDSubsystem(const llvm::Twine& name, double p, double i, double d);
|
||||
PIDSubsystem(const llvm::Twine& name, double p, double i, double d, double f);
|
||||
PIDSubsystem(const llvm::Twine& name, double p, double i, double d, double f,
|
||||
double period);
|
||||
PIDSubsystem(double p, double i, double d);
|
||||
PIDSubsystem(double p, double i, double d, double f);
|
||||
|
||||
@@ -9,13 +9,15 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/InstantCommand.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
class PrintCommand : public InstantCommand {
|
||||
public:
|
||||
explicit PrintCommand(const std::string& message);
|
||||
explicit PrintCommand(const llvm::Twine& message);
|
||||
virtual ~PrintCommand() = default;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace frc {
|
||||
*/
|
||||
class TimedCommand : public Command {
|
||||
public:
|
||||
TimedCommand(const std::string& name, double timeout);
|
||||
TimedCommand(const llvm::Twine& name, double timeout);
|
||||
explicit TimedCommand(double timeout);
|
||||
virtual ~TimedCommand() = default;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/TimedCommand.h"
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace frc {
|
||||
class WaitCommand : public TimedCommand {
|
||||
public:
|
||||
explicit WaitCommand(double timeout);
|
||||
WaitCommand(const std::string& name, double timeout);
|
||||
WaitCommand(const llvm::Twine& name, double timeout);
|
||||
virtual ~WaitCommand() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace frc {
|
||||
class WaitForChildren : public Command {
|
||||
public:
|
||||
explicit WaitForChildren(double timeout);
|
||||
WaitForChildren(const std::string& name, double timeout);
|
||||
WaitForChildren(const llvm::Twine& name, double timeout);
|
||||
virtual ~WaitForChildren() = default;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <llvm/Twine.h>
|
||||
|
||||
#include "Commands/Command.h"
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace frc {
|
||||
class WaitUntilCommand : public Command {
|
||||
public:
|
||||
explicit WaitUntilCommand(double time);
|
||||
WaitUntilCommand(const std::string& name, double time);
|
||||
WaitUntilCommand(const llvm::Twine& name, double time);
|
||||
virtual ~WaitUntilCommand() = default;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user