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

@@ -27,11 +27,11 @@
*/
class Button : public Trigger {
public:
virtual void WhenPressed(Command *command);
virtual void WhileHeld(Command *command);
virtual void WhenReleased(Command *command);
virtual void CancelWhenPressed(Command *command);
virtual void ToggleWhenPressed(Command *command);
virtual void WhenPressed(Command* command);
virtual void WhileHeld(Command* command);
virtual void WhenReleased(Command* command);
virtual void CancelWhenPressed(Command* command);
virtual void ToggleWhenPressed(Command* command);
};
#endif

View File

@@ -13,15 +13,15 @@ class Command;
class ButtonScheduler {
public:
ButtonScheduler(bool last, Trigger *button, Command *orders);
ButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~ButtonScheduler() = default;
virtual void Execute() = 0;
void Start();
protected:
bool m_pressedLast;
Trigger *m_button;
Command *m_command;
Trigger* m_button;
Command* m_command;
};
#endif

View File

@@ -15,7 +15,7 @@ class Command;
class CancelButtonScheduler : public ButtonScheduler {
public:
CancelButtonScheduler(bool last, Trigger *button, Command *orders);
CancelButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~CancelButtonScheduler() = default;
virtual void Execute();

View File

@@ -15,7 +15,7 @@ class Command;
class HeldButtonScheduler : public ButtonScheduler {
public:
HeldButtonScheduler(bool last, Trigger *button, Command *orders);
HeldButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~HeldButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -8,18 +8,18 @@
#ifndef __JOYSTICK_BUTTON_H__
#define __JOYSTICK_BUTTON_H__
#include "GenericHID.h"
#include "Buttons/Button.h"
#include "GenericHID.h"
class JoystickButton : public Button {
public:
JoystickButton(GenericHID *joystick, int buttonNumber);
JoystickButton(GenericHID* joystick, int buttonNumber);
virtual ~JoystickButton() = default;
virtual bool Get();
private:
GenericHID *m_joystick;
GenericHID* m_joystick;
int m_buttonNumber;
};

View File

@@ -8,14 +8,14 @@
#ifndef __NETWORK_BUTTON_H__
#define __NETWORK_BUTTON_H__
#include "Buttons/Button.h"
#include <string>
#include <memory>
#include <string>
#include "Buttons/Button.h"
class NetworkButton : public Button {
public:
NetworkButton(const std::string &tableName, const std::string &field);
NetworkButton(std::shared_ptr<ITable> table, const std::string &field);
NetworkButton(const std::string& tableName, const std::string& field);
NetworkButton(std::shared_ptr<ITable> table, const std::string& field);
virtual ~NetworkButton() = default;
virtual bool Get();

View File

@@ -15,7 +15,7 @@ class Command;
class PressedButtonScheduler : public ButtonScheduler {
public:
PressedButtonScheduler(bool last, Trigger *button, Command *orders);
PressedButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~PressedButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -15,7 +15,7 @@ class Command;
class ReleasedButtonScheduler : public ButtonScheduler {
public:
ReleasedButtonScheduler(bool last, Trigger *button, Command *orders);
ReleasedButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~ReleasedButtonScheduler() = default;
virtual void Execute();
};

View File

@@ -15,7 +15,7 @@ class Command;
class ToggleButtonScheduler : public ButtonScheduler {
public:
ToggleButtonScheduler(bool last, Trigger *button, Command *orders);
ToggleButtonScheduler(bool last, Trigger* button, Command* orders);
virtual ~ToggleButtonScheduler() = default;
virtual void Execute();

View File

@@ -8,8 +8,8 @@
#ifndef __TRIGGER_H__
#define __TRIGGER_H__
#include "SmartDashboard/Sendable.h"
#include <memory>
#include "SmartDashboard/Sendable.h"
class Command;
@@ -36,11 +36,11 @@ class Trigger : public Sendable {
virtual ~Trigger() = default;
bool Grab();
virtual bool Get() = 0;
void WhenActive(Command *command);
void WhileActive(Command *command);
void WhenInactive(Command *command);
void CancelWhenActive(Command *command);
void ToggleWhenActive(Command *command);
void WhenActive(Command* command);
void WhileActive(Command* command);
void WhenInactive(Command* command);
void CancelWhenActive(Command* command);
void ToggleWhenActive(Command* command);
virtual void InitTable(std::shared_ptr<ITable> table);
virtual std::shared_ptr<ITable> GetTable() const;