Display inherits the Print class which is part of the Arduino core library. If you look at the header for the Print class (arduino-1.0.5\hardware\arduino\cores\arduino\Print.h) you'll see there's a pure virtual member for printing a single character which derived classes need to implement:
- Code: Select all
virtual size_t write(uint8_t) = 0;
And sure enough there's an implementation of this function in Gamebuino's Display class. By inheriting Print you get all the usual output features like println, formatted printing etc without having to implement all that functionality yourself.
More details here:
http://playground.arduino.cc/Code/Printclass