Remove GetTable from wpilibc Sendable interface.

This allows nearly all m_table member variables to be removed.
This commit is contained in:
Peter Johnson
2017-09-02 00:35:30 -07:00
parent 040a8c6bcc
commit 0d4fde17e0
57 changed files with 87 additions and 259 deletions

View File

@@ -161,12 +161,8 @@ class Command : public ErrorBase, public NamedSendable {
public:
std::string GetName() const override;
void InitTable(std::shared_ptr<nt::NetworkTable> subtable) override;
std::shared_ptr<nt::NetworkTable> GetTable() const override;
std::string GetSmartDashboardType() const override;
protected:
std::shared_ptr<nt::NetworkTable> m_table;
private:
nt::NetworkTableEntry m_runningEntry;
nt::NetworkTableEntry m_isParentedEntry;

View File

@@ -44,7 +44,6 @@ class Scheduler : public ErrorBase, public NamedSendable {
void UpdateTable();
std::string GetSmartDashboardType() const;
void InitTable(std::shared_ptr<nt::NetworkTable> subTable);
std::shared_ptr<nt::NetworkTable> GetTable() const;
std::string GetName() const;
std::string GetType() const;
@@ -68,7 +67,6 @@ class Scheduler : public ErrorBase, public NamedSendable {
std::vector<std::string> commands;
std::vector<double> ids;
std::vector<double> toCancel;
std::shared_ptr<nt::NetworkTable> m_table;
nt::NetworkTableEntry m_namesEntry;
nt::NetworkTableEntry m_idsEntry;
nt::NetworkTableEntry m_cancelEntry;

View File

@@ -44,11 +44,9 @@ class Subsystem : public ErrorBase, public NamedSendable {
public:
std::string GetName() const override;
void InitTable(std::shared_ptr<nt::NetworkTable> subtable) override;
std::shared_ptr<nt::NetworkTable> GetTable() const override;
std::string GetSmartDashboardType() const override;
protected:
std::shared_ptr<nt::NetworkTable> m_table;
nt::NetworkTableEntry m_hasDefaultEntry;
nt::NetworkTableEntry m_defaultEntry;
nt::NetworkTableEntry m_hasCommandEntry;