Namespace all wpilibc functions/classes into "frc" namespace. (#311)

Base.h provides a backwards compatibility shim (enabled unless
NAMESPACED_WPILIB is defined) that does a "using namespace frc".
However, as some header files do not include Base.h, this may
be a breaking change in some corner cases (with an easy fix).

Fixes #218.
This commit is contained in:
Peter Johnson
2016-11-01 22:33:12 -07:00
committed by GitHub
parent 36ad45c07d
commit 59267da72b
318 changed files with 988 additions and 10 deletions

View File

@@ -7,6 +7,8 @@
#include "Buttons/Button.h"
using namespace frc;
/**
* Specifies the command to run when a button is first pressed.
*

View File

@@ -9,6 +9,8 @@
#include "Commands/Scheduler.h"
using namespace frc;
ButtonScheduler::ButtonScheduler(bool last, Trigger* button, Command* orders)
: m_pressedLast(last), m_button(button), m_command(orders) {}

View File

@@ -10,6 +10,8 @@
#include "Buttons/Button.h"
#include "Commands/Command.h"
using namespace frc;
CancelButtonScheduler::CancelButtonScheduler(bool last, Trigger* button,
Command* orders)
: ButtonScheduler(last, button, orders) {

View File

@@ -10,6 +10,8 @@
#include "Buttons/Button.h"
#include "Commands/Command.h"
using namespace frc;
HeldButtonScheduler::HeldButtonScheduler(bool last, Trigger* button,
Command* orders)
: ButtonScheduler(last, button, orders) {}

View File

@@ -7,6 +7,8 @@
#include "Buttons/InternalButton.h"
using namespace frc;
InternalButton::InternalButton(bool inverted)
: m_pressed(inverted), m_inverted(inverted) {}

View File

@@ -7,6 +7,8 @@
#include "Buttons/JoystickButton.h"
using namespace frc;
JoystickButton::JoystickButton(GenericHID* joystick, int buttonNumber)
: m_joystick(joystick), m_buttonNumber(buttonNumber) {}

View File

@@ -9,6 +9,8 @@
#include "networktables/NetworkTable.h"
using namespace frc;
NetworkButton::NetworkButton(const std::string& tableName,
const std::string& field)
: // TODO how is this supposed to work???

View File

@@ -10,6 +10,8 @@
#include "Buttons/Button.h"
#include "Commands/Command.h"
using namespace frc;
PressedButtonScheduler::PressedButtonScheduler(bool last, Trigger* button,
Command* orders)
: ButtonScheduler(last, button, orders) {}

View File

@@ -10,6 +10,8 @@
#include "Buttons/Button.h"
#include "Commands/Command.h"
using namespace frc;
ReleasedButtonScheduler::ReleasedButtonScheduler(bool last, Trigger* button,
Command* orders)
: ButtonScheduler(last, button, orders) {}

View File

@@ -10,6 +10,8 @@
#include "Buttons/Button.h"
#include "Commands/Command.h"
using namespace frc;
ToggleButtonScheduler::ToggleButtonScheduler(bool last, Trigger* button,
Command* orders)
: ButtonScheduler(last, button, orders) {

View File

@@ -12,6 +12,8 @@
#include "Buttons/ReleasedButtonScheduler.h"
#include "Buttons/ToggleButtonScheduler.h"
using namespace frc;
bool Trigger::Grab() {
if (Get()) {
return true;