Soldered SD Card Arduino Library 1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Loading...
Searching...
No Matches
iostream.h
Go to the documentation of this file.
1
25#ifndef iostream_h
26#define iostream_h
31#include "istream.h"
32#include "ostream.h"
37inline istream &ws(istream &is)
38{
39 is.skipWhite();
40 return is;
41}
46inline ostream &endl(ostream &os)
47{
48 os.put('\n');
49#if ENDL_CALLS_FLUSH
50 os.flush();
51#endif // ENDL_CALLS_FLUSH
52 return os;
53}
58inline ostream &flush(ostream &os)
59{
60 os.flush();
61 return os;
62}
67struct setfill
68{
70 char c;
75 explicit setfill(char arg) : c(arg)
76 {
77 }
78};
84inline ostream &operator<<(ostream &os, const setfill &arg)
85{
86 os.fill(arg.c);
87 return os;
88}
94inline istream &operator>>(istream &obj, const setfill &arg)
95{
96 obj.fill(arg.c);
97 return obj;
98}
99//------------------------------------------------------------------------------
104{
106 unsigned int p;
110 explicit setprecision(unsigned int arg) : p(arg)
111 {
112 }
113};
119inline ostream &operator<<(ostream &os, const setprecision &arg)
120{
121 os.precision(arg.p);
122 return os;
123}
129inline istream &operator>>(istream &is, const setprecision &arg)
130{
131 is.precision(arg.p);
132 return is;
133}
134//------------------------------------------------------------------------------
138struct setw
139{
141 unsigned w;
145 explicit setw(unsigned arg) : w(arg)
146 {
147 }
148};
154inline ostream &operator<<(ostream &os, const setw &arg)
155{
156 os.width(arg.w);
157 return os;
158}
164inline istream &operator>>(istream &is, const setw &arg)
165{
166 is.width(arg.w);
167 return is;
168}
169//==============================================================================
174class iostream : public istream, public ostream
175{
176};
177#endif // iostream_h
int precision() const
Definition ios.h:181
char fill()
Definition ios.h:151
unsigned width()
Definition ios.h:225
Input/Output stream.
Definition iostream.h:175
Input Stream.
Definition istream.h:38
void skipWhite()
Definition istream.cpp:476
Output Stream.
Definition ostream.h:38
ostream & put(char ch)
Definition ostream.h:252
ostream & flush()
Definition ostream.h:263
istream & ws(istream &is)
Definition iostream.h:37
ostream & flush(ostream &os)
Definition iostream.h:58
istream & operator>>(istream &obj, const setfill &arg)
Definition iostream.h:94
ostream & operator<<(ostream &os, const setfill &arg)
Definition iostream.h:84
ostream & endl(ostream &os)
Definition iostream.h:46
istream class
ostream class
type for setfill manipulator
Definition iostream.h:68
char c
Definition iostream.h:70
setfill(char arg)
Definition iostream.h:75
type for setprecision manipulator
Definition iostream.h:104
setprecision(unsigned int arg)
Definition iostream.h:110
unsigned int p
Definition iostream.h:106
type for setw manipulator
Definition iostream.h:139
unsigned w
Definition iostream.h:141
setw(unsigned arg)
Definition iostream.h:145