Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Printable.h
00001 /* 00002 Printable.h - Interface class that allows printing of complex types 00003 Copyright (c) 2011 Adrian McEwen. All right reserved. 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Lesser General Public License for more details. 00012 You should have received a copy of the GNU Lesser General Public 00013 License along with this library; if not, write to the Free Software 00014 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00015 */ 00016 00017 #ifndef Printable_h 00018 #define Printable_h 00019 00020 #include <stdlib.h> 00021 00022 class Print; 00023 00024 /** The Printable class provides a way for new classes to allow themselves to be printed. 00025 By deriving from Printable and implementing the printTo method, it will then be possible 00026 for users to print out instances of this class by passing them into the usual 00027 Print::print and Print::println methods. 00028 */ 00029 00030 class Printable { 00031 public: 00032 virtual size_t printTo(Print& p) const = 0; 00033 }; 00034 00035 #endif
Generated on Sat Jul 16 2022 20:55:16 by
1.7.2