hadif azli
/
TEST123
BLYNK TEST
Printable.h@0:d8f4c441e032, 2016-06-10 (annotated)
- Committer:
- lixianyu
- Date:
- Fri Jun 10 15:20:20 2016 +0000
- Revision:
- 0:d8f4c441e032
u8glib???????????i2c???
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lixianyu | 0:d8f4c441e032 | 1 | /* |
lixianyu | 0:d8f4c441e032 | 2 | Printable.h - Interface class that allows printing of complex types |
lixianyu | 0:d8f4c441e032 | 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. |
lixianyu | 0:d8f4c441e032 | 4 | |
lixianyu | 0:d8f4c441e032 | 5 | This library is free software; you can redistribute it and/or |
lixianyu | 0:d8f4c441e032 | 6 | modify it under the terms of the GNU Lesser General Public |
lixianyu | 0:d8f4c441e032 | 7 | License as published by the Free Software Foundation; either |
lixianyu | 0:d8f4c441e032 | 8 | version 2.1 of the License, or (at your option) any later version. |
lixianyu | 0:d8f4c441e032 | 9 | |
lixianyu | 0:d8f4c441e032 | 10 | This library is distributed in the hope that it will be useful, |
lixianyu | 0:d8f4c441e032 | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
lixianyu | 0:d8f4c441e032 | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
lixianyu | 0:d8f4c441e032 | 13 | Lesser General Public License for more details. |
lixianyu | 0:d8f4c441e032 | 14 | |
lixianyu | 0:d8f4c441e032 | 15 | You should have received a copy of the GNU Lesser General Public |
lixianyu | 0:d8f4c441e032 | 16 | License along with this library; if not, write to the Free Software |
lixianyu | 0:d8f4c441e032 | 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
lixianyu | 0:d8f4c441e032 | 18 | */ |
lixianyu | 0:d8f4c441e032 | 19 | |
lixianyu | 0:d8f4c441e032 | 20 | #ifndef Printable_h |
lixianyu | 0:d8f4c441e032 | 21 | #define Printable_h |
lixianyu | 0:d8f4c441e032 | 22 | |
lixianyu | 0:d8f4c441e032 | 23 | #include <stdlib.h> |
lixianyu | 0:d8f4c441e032 | 24 | |
lixianyu | 0:d8f4c441e032 | 25 | class Print; |
lixianyu | 0:d8f4c441e032 | 26 | |
lixianyu | 0:d8f4c441e032 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. |
lixianyu | 0:d8f4c441e032 | 28 | By deriving from Printable and implementing the printTo method, it will then be possible |
lixianyu | 0:d8f4c441e032 | 29 | for users to print out instances of this class by passing them into the usual |
lixianyu | 0:d8f4c441e032 | 30 | Print::print and Print::println methods. |
lixianyu | 0:d8f4c441e032 | 31 | */ |
lixianyu | 0:d8f4c441e032 | 32 | |
lixianyu | 0:d8f4c441e032 | 33 | class Printable |
lixianyu | 0:d8f4c441e032 | 34 | { |
lixianyu | 0:d8f4c441e032 | 35 | public: |
lixianyu | 0:d8f4c441e032 | 36 | virtual size_t printTo(Print& p) const = 0; |
lixianyu | 0:d8f4c441e032 | 37 | }; |
lixianyu | 0:d8f4c441e032 | 38 | |
lixianyu | 0:d8f4c441e032 | 39 | #endif |
lixianyu | 0:d8f4c441e032 | 40 | |
lixianyu | 0:d8f4c441e032 | 41 |