[wpilib] SendableBuilder: Make GetTable() visible

This commit is contained in:
Peter Johnson
2020-10-26 00:15:21 -07:00
parent c11d34b26c
commit 8cd42478e1
4 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
#include <networktables/NetworkTable.h>
#include <networktables/NetworkTableEntry.h>
#include <networktables/NetworkTableValue.h>
#include <wpi/ArrayRef.h>
@@ -24,6 +25,12 @@ class SendableBuilder {
public:
virtual ~SendableBuilder() = default;
/**
* Get the network table.
* @return The network table
*/
virtual std::shared_ptr<nt::NetworkTable> GetTable() = 0;
/**
* Set the string representation of the named data type that will be used
* by the smart dashboard for this sendable.

View File

@@ -43,7 +43,7 @@ class SendableBuilderImpl : public SendableBuilder {
* Get the network table.
* @return The network table
*/
std::shared_ptr<nt::NetworkTable> GetTable();
std::shared_ptr<nt::NetworkTable> GetTable() override;
/**
* Return whether this sendable has an associated table.