sanguino/cores/arduino/Printable.h

Fri, 17 Nov 2017 10:13:31 +0100

author
mdd
date
Fri, 17 Nov 2017 10:13:31 +0100
changeset 3
770b218a4931
parent 2
b373b0288715
permissions
-rw-r--r--

proper configuration, homing and planner optimization

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

mercurial