mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Reflowed comments and removed commented out code (#735)
This commit is contained in:
committed by
Peter Johnson
parent
1e8d18b328
commit
c663d7cd16
@@ -15,13 +15,12 @@ namespace frc {
|
||||
|
||||
/**
|
||||
* The interface for sendable objects that gives the sendable a default name in
|
||||
* the Smart Dashboard
|
||||
*
|
||||
* the Smart Dashboard.
|
||||
*/
|
||||
class NamedSendable : public Sendable {
|
||||
public:
|
||||
/**
|
||||
* @return the name of the subtable of SmartDashboard that the Sendable object
|
||||
* @return The name of the subtable of SmartDashboard that the Sendable object
|
||||
* will use
|
||||
*/
|
||||
virtual std::string GetName() const = 0;
|
||||
|
||||
@@ -18,12 +18,13 @@ class Sendable {
|
||||
public:
|
||||
/**
|
||||
* Initializes a table for this sendable object.
|
||||
*
|
||||
* @param subtable The table to put the values in.
|
||||
*/
|
||||
virtual void InitTable(std::shared_ptr<nt::NetworkTable> subtable) = 0;
|
||||
|
||||
/**
|
||||
* @return the string representation of the named data type that will be used
|
||||
* @return The string representation of the named data type that will be used
|
||||
* by the smart dashboard for this sendable
|
||||
*/
|
||||
virtual std::string GetSmartDashboardType() const = 0;
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* The {@link SendableChooser} class is a useful tool for presenting a selection
|
||||
* of options to the {@link SmartDashboard}.
|
||||
* The SendableChooser class is a useful tool for presenting a selection of
|
||||
* options to the SmartDashboard.
|
||||
*
|
||||
* <p>For instance, you may wish to be able to select between multiple
|
||||
* autonomous modes. You can do this by putting every possible {@link Command}
|
||||
* you want to run as an autonomous into a {@link SendableChooser} and then put
|
||||
* it into the {@link SmartDashboard} to have a list of options appear on the
|
||||
* laptop. Once autonomous starts, simply ask the {@link SendableChooser} what
|
||||
* the selected value is.</p>
|
||||
* For instance, you may wish to be able to select between multiple autonomous
|
||||
* modes. You can do this by putting every possible Command you want to run as
|
||||
* an autonomous into a SendableChooser and then put it into the SmartDashboard
|
||||
* to have a list of options appear on the laptop. Once autonomous starts,
|
||||
* simply ask the SendableChooser what the selected value is.
|
||||
*
|
||||
* @tparam T The type of values to be stored
|
||||
* @see SmartDashboard
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace frc {
|
||||
/**
|
||||
* Adds the given object to the list of options.
|
||||
*
|
||||
* On the {@link SmartDashboard} on the desktop, the object will appear as the
|
||||
* given name.
|
||||
* On the SmartDashboard on the desktop, the object will appear as the given
|
||||
* name.
|
||||
*
|
||||
* @param name the name of the option
|
||||
* @param object the option
|
||||
@@ -32,9 +32,8 @@ void SendableChooser<T>::AddObject(llvm::StringRef name, T object) {
|
||||
/**
|
||||
* Add the given object to the list of options and marks it as the default.
|
||||
*
|
||||
* Functionally, this is very close to {@link SendableChooser#AddObject(const
|
||||
* char *name, void *object) AddObject(...)} except that it will use this as
|
||||
* the default option if none other is explicitly selected.
|
||||
* Functionally, this is very close to AddObject() except that it will use this
|
||||
* as the default option if none other is explicitly selected.
|
||||
*
|
||||
* @param name the name of the option
|
||||
* @param object the option
|
||||
@@ -49,12 +48,12 @@ void SendableChooser<T>::AddDefault(llvm::StringRef name, T object) {
|
||||
* Returns a copy of the selected option (a raw pointer U* if T =
|
||||
* std::unique_ptr<U> or a std::weak_ptr<U> if T = std::shared_ptr<U>).
|
||||
*
|
||||
* If there is none selected, it will return the default. If there is none
|
||||
* If there is none selected, it will return the default. If there is none
|
||||
* selected and no default, then it will return a value-initialized instance.
|
||||
* For integer types, this is 0. For container types like std::string, this is
|
||||
* an empty string.
|
||||
*
|
||||
* @return the option selected
|
||||
* @return The option selected
|
||||
*/
|
||||
template <class T>
|
||||
auto SendableChooser<T>::GetSelected()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* This class is a non-template base class for {@link SendableChooser}.
|
||||
* This class is a non-template base class for SendableChooser.
|
||||
*
|
||||
* It contains static, non-templated variables to avoid their duplication in the
|
||||
* template class.
|
||||
|
||||
Reference in New Issue
Block a user