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,31 +8,31 @@
#ifndef __SCHEDULER_H__
#define __SCHEDULER_H__
#include "Commands/Command.h"
#include "ErrorBase.h"
#include "SmartDashboard/NamedSendable.h"
#include "networktables/NetworkTable.h"
#include "SmartDashboard/SmartDashboard.h"
#include <list>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "Commands/Command.h"
#include "ErrorBase.h"
#include "HAL/cpp/priority_mutex.h"
#include "SmartDashboard/NamedSendable.h"
#include "SmartDashboard/SmartDashboard.h"
#include "networktables/NetworkTable.h"
class ButtonScheduler;
class Subsystem;
class Scheduler : public ErrorBase, public NamedSendable {
public:
static Scheduler *GetInstance();
static Scheduler* GetInstance();
void AddCommand(Command *command);
void AddButton(ButtonScheduler *button);
void RegisterSubsystem(Subsystem *subsystem);
void AddCommand(Command* command);
void AddButton(ButtonScheduler* button);
void RegisterSubsystem(Subsystem* subsystem);
void Run();
void Remove(Command *command);
void Remove(Command* command);
void RemoveAll();
void ResetAll();
void SetEnabled(bool enabled);
@@ -48,16 +48,16 @@ class Scheduler : public ErrorBase, public NamedSendable {
Scheduler();
virtual ~Scheduler() = default;
void ProcessCommandAddition(Command *command);
void ProcessCommandAddition(Command* command);
Command::SubsystemSet m_subsystems;
priority_mutex m_buttonsLock;
typedef std::vector<ButtonScheduler *> ButtonVector;
typedef std::vector<ButtonScheduler*> ButtonVector;
ButtonVector m_buttons;
typedef std::vector<Command *> CommandVector;
typedef std::vector<Command*> CommandVector;
priority_mutex m_additionsLock;
CommandVector m_additions;
typedef std::set<Command *> CommandSet;
typedef std::set<Command*> CommandSet;
CommandSet m_commands;
bool m_adding = false;
bool m_enabled = true;