Class DriversSingleton

Class Documentation

class DriversSingleton

Class that allows one to construct a Drivers instance because of frienship with the Drivers class.

Public Static Functions

static Drivers &getDrivers()

Note

I don’t like unecessary pointers. Derferencing the drivers pointer and passing it as a reference twice will cause a crash for some reason. It is likely that you will never have to use this. There are only two files you should be calling this function from — main.cpp and *_control.cpp, either to run I/O stuff and to add a Drivers pointer to an instance of a Subsystem or Command.

Returns:

The singleton instance of the Drivers class. This is the only instance of the Drivers class that should be created anywhere in the non-unit test framework.