Add format script which invokes clang-format on the C++ source code (#41)

On Windows machines, clang-format.exe must be in the PATH environment variable.
This commit is contained in:
Tyler Veness
2016-05-20 17:30:37 -07:00
committed by Peter Johnson
parent 68690643d2
commit e14e45da76
383 changed files with 13787 additions and 13198 deletions

View File

@@ -8,26 +8,22 @@
#ifndef __SENDABLE_CHOOSER_H__
#define __SENDABLE_CHOOSER_H__
#include "SmartDashboard/Sendable.h"
#include "tables/ITable.h"
#include <map>
#include <memory>
#include <string>
#include "SmartDashboard/Sendable.h"
#include "tables/ITable.h"
/**
* The {@link SendableChooser} class is a useful tool for presenting a selection
* of options
* to the {@link SmartDashboard}.
* of options to the {@link 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>
* 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>
*
* @see SmartDashboard
*/
@@ -35,9 +31,9 @@ class SendableChooser : public Sendable {
public:
virtual ~SendableChooser() = default;
void AddObject(const std::string &name, void *object);
void AddDefault(const std::string &name, void *object);
void *GetSelected();
void AddObject(const std::string& name, void* object);
void AddDefault(const std::string& name, void* object);
void* GetSelected();
virtual void InitTable(std::shared_ptr<ITable> subtable);
virtual std::shared_ptr<ITable> GetTable() const;
@@ -45,7 +41,7 @@ class SendableChooser : public Sendable {
private:
std::string m_defaultChoice;
std::map<std::string, void *> m_choices;
std::map<std::string, void*> m_choices;
std::shared_ptr<ITable> m_table;
};