Plaquette
 
Loading...
Searching...
No Matches
pq_print.h
1/*
2 * pq_print.h
3 *
4 * Print functions for Plaquette.
5 *
6 * (c) 2015 Sofian Audry :: info(@)sofianaudry(.)com
7 * (c) 2015 Thomas O Fredericks :: tof(@)t-o-f(.)info
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#ifndef PQ_PRINT_H_
24#define PQ_PRINT_H_
25
26#if (defined(ARDUINO) && ARDUINO >= 100) || defined(EPOXY_DUINO)
27#include <Arduino.h>
28#else
29#include <WProgram.h>
30#endif
31
32#include "pq_globals.h"
33
34namespace pq {
35
36// Declare class here to prevent circular include issue.
37class Monitor;
38
45void defaultPrintDevice(Print& device);
46
53void defaultPrintDevice(Monitor& device);
54
58void noDefaultPrintDevice();
59
66Print& defaultPrintDevice();
67
71bool hasDefaultPrintDevice();
72
73// Print functions.
74size_t print(const __FlashStringHelper *);
75size_t print(const String &);
76size_t print(const char[]);
77size_t print(char);
78size_t print(unsigned char, int = DEC);
79size_t print(int, int = DEC);
80size_t print(unsigned int, int = DEC);
81size_t print(long, int = DEC);
82size_t print(unsigned long, int = DEC);
83size_t print(double);
84size_t print(double, int);
85size_t print(const Printable&);
86
87size_t println(const __FlashStringHelper *);
88size_t println(const String &s);
89size_t println(const char[]);
90size_t println(char);
91size_t println(unsigned char, int = DEC);
92size_t println(int, int = DEC);
93size_t println(unsigned int, int = DEC);
94size_t println(long, int = DEC);
95size_t println(unsigned long, int = DEC);
96size_t println(double);
97size_t println(double, int);
98size_t println(const Printable&);
99size_t println(void);
100
101} // namespace pq
102
103#endif