mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Simplify Sendable interface (#1864)
This removes the name and subsystem from individual objects, and instead puts this data into a new singleton class, SendableRegistry. Much of LiveWindow has been refactored into SendableRegistry. In C++, a new CRTP helper class, SendableHelper, has been added to provide move and destruction functionality. Shims for GetName, SetName, GetSubsystem, and SetSubsystem have been added to Command and Subsystem (both old and new), and also to SendableHelper to prevent code breakage. This deprecates SendableBase in preparation for future removal.
This commit is contained in:
@@ -52,9 +52,13 @@ class ProxyScheduleCommand;
|
||||
class Command : public frc::ErrorBase {
|
||||
public:
|
||||
Command() = default;
|
||||
Command(Command&& other) = default;
|
||||
virtual ~Command();
|
||||
|
||||
Command(const Command&);
|
||||
Command& operator=(const Command&);
|
||||
Command(Command&&) = default;
|
||||
Command& operator=(Command&&) = default;
|
||||
|
||||
/**
|
||||
* The initial subroutine of a command. Called once when the command is
|
||||
* initially scheduled.
|
||||
|
||||
Reference in New Issue
Block a user