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
ostream Class Reference

Output Stream. More...

#include <ostream.h>

Inherits ios.

Inherited by ArduinoOutStream, iostream, obufstream, and ofstream.

Public Member Functions

 ostream ()
 
ostreamoperator<< (ostream &(*pf)(ostream &str))
 
ostreamoperator<< (ios_base &(*pf)(ios_base &str))
 
ostreamoperator<< (bool arg)
 
ostreamoperator<< (const char *arg)
 
ostreamoperator<< (const signed char *arg)
 
ostreamoperator<< (const unsigned char *arg)
 
ostreamoperator<< (const String &arg)
 
ostreamoperator<< (char arg)
 
ostreamoperator<< (signed char arg)
 
ostreamoperator<< (unsigned char arg)
 
ostreamoperator<< (double arg)
 
ostreamoperator<< (float arg)
 
ostreamoperator<< (short arg)
 
ostreamoperator<< (unsigned short arg)
 
ostreamoperator<< (int arg)
 
ostreamoperator<< (unsigned int arg)
 
ostreamoperator<< (long arg)
 
ostreamoperator<< (unsigned long arg)
 
ostreamoperator<< (long long arg)
 
ostreamoperator<< (unsigned long long arg)
 
ostreamoperator<< (const void *arg)
 
ostreamoperator<< (const __FlashStringHelper *arg)
 
ostreamput (char ch)
 
ostreamflush ()
 
pos_type tellp ()
 
ostreamseekp (pos_type pos)
 
ostreamseekp (off_type off, seekdir way)
 
- Public Member Functions inherited from ios
 ios ()
 
 operator const void * () const
 
bool operator! () const
 
 operator bool () const
 
iostate rdstate () const
 
bool good () const
 
bool eof () const
 
bool fail () const
 
bool bad () const
 
void clear (iostate state=goodbit)
 
void setstate (iostate state)
 
- Public Member Functions inherited from ios_base
 ios_base ()
 
char fill ()
 
char fill (char c)
 
fmtflags flags () const
 
fmtflags flags (fmtflags fl)
 
int precision () const
 
int precision (unsigned int n)
 
fmtflags setf (fmtflags fl)
 
fmtflags setf (fmtflags fl, fmtflags mask)
 
void unsetf (fmtflags fl)
 
unsigned width ()
 
unsigned width (unsigned n)
 

Private Member Functions

void do_fill (unsigned len)
 
void fill_not_left (unsigned len)
 
void putBool (bool b)
 
void putChar (char c)
 
void putDouble (double n)
 
void putNum (int32_t n)
 
void putNum (int64_t n)
 
void putNum (uint32_t n)
 
void putNum (uint64_t n)
 
void putPgm (const char *str)
 
void putStr (const char *str)
 
template<typename T >
char * fmtNum (T n, char *ptr, uint8_t base)
 
template<typename T >
void putNum (T n, bool neg)
 

Additional Inherited Members

- Public Types inherited from ios_base
enum  seekdir { beg , cur , end }
 
typedef unsigned char iostate
 
typedef uint32_t streamsize
 
typedef uint32_t pos_type
 
typedef int32_t off_type
 
typedef uint64_t streamsize
 
typedef uint64_t pos_type
 
typedef int64_t off_type
 
typedef unsigned int fmtflags
 
typedef uint8_t openmode
 
- Static Public Attributes inherited from ios_base
static const iostate goodbit = 0x00
 
static const iostate badbit = 0X01
 
static const iostate eofbit = 0x02
 
static const iostate failbit = 0X04
 
static const fmtflags left = 0x0001
 
static const fmtflags right = 0x0002
 
static const fmtflags internal = 0x0004
 
static const fmtflags dec = 0x0008
 
static const fmtflags hex = 0x0010
 
static const fmtflags oct = 0x0020
 
static const fmtflags boolalpha = 0x0100
 
static const fmtflags showbase = 0x0200
 
static const fmtflags showpoint = 0x0400
 
static const fmtflags showpos = 0x0800
 
static const fmtflags skipws = 0x1000
 
static const fmtflags uppercase = 0x4000
 
static const fmtflags adjustfield = left | right | internal
 
static const fmtflags basefield = dec | hex | oct
 
static const openmode app = 0X4
 
static const openmode ate = 0X8
 
static const openmode binary = 0X10
 
static const openmode in = 0X20
 
static const openmode out = 0X40
 
static const openmode trunc = 0X80
 
- Protected Member Functions inherited from ios_base
uint8_t flagsToBase ()
 

Detailed Description

Output Stream.

Constructor & Destructor Documentation

◆ ostream()

ostream::ostream ( )
inline

Member Function Documentation

◆ do_fill()

void ostream::do_fill ( unsigned  len)
private

◆ fill_not_left()

void ostream::fill_not_left ( unsigned  len)
private

◆ flush()

ostream & ostream::flush ( )
inline

Flushes the buffer associated with this stream. The flush function calls the sync function of the associated file.

Returns
A reference to the ostream object.

◆ fmtNum()

template<typename T >
char * ostream::fmtNum ( n,
char *  ptr,
uint8_t  base 
)
inlineprivate

◆ operator<<() [1/22]

ostream & ostream::operator<< ( bool  arg)
inline

Output bool

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [2/22]

ostream & ostream::operator<< ( char  arg)
inline

Output character

Parameters
[in]argcharacter to output
Returns
the stream

◆ operator<<() [3/22]

ostream & ostream::operator<< ( const __FlashStringHelper *  arg)
inline

Output a string from flash using the Arduino F() macro.

Parameters
[in]argpointing to flash string
Returns
the stream

◆ operator<<() [4/22]

ostream & ostream::operator<< ( const char *  arg)
inline

Output string

Parameters
[in]argstring to output
Returns
the stream

◆ operator<<() [5/22]

ostream & ostream::operator<< ( const signed char *  arg)
inline

Output string

Parameters
[in]argstring to output
Returns
the stream

◆ operator<<() [6/22]

ostream & ostream::operator<< ( const String &  arg)
inline

Output string

Parameters
[in]argstring to output
Returns
the stream

◆ operator<<() [7/22]

ostream & ostream::operator<< ( const unsigned char *  arg)
inline

Output string

Parameters
[in]argstring to output
Returns
the stream

◆ operator<<() [8/22]

ostream & ostream::operator<< ( const void *  arg)
inline

Output pointer

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [9/22]

ostream & ostream::operator<< ( double  arg)
inline

Output double

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [10/22]

ostream & ostream::operator<< ( float  arg)
inline

Output float

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [11/22]

ostream & ostream::operator<< ( int  arg)
inline

Output signed int

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [12/22]

ostream & ostream::operator<< ( ios_base &(*)(ios_base &str)  pf)
inline

call manipulator

Parameters
[in]pffunction to call
Returns
the stream

◆ operator<<() [13/22]

ostream & ostream::operator<< ( long  arg)
inline

Output signed long

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [14/22]

ostream & ostream::operator<< ( long long  arg)
inline

Output signed long long

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [15/22]

ostream & ostream::operator<< ( ostream &(*)(ostream &str)  pf)
inline

call manipulator

Parameters
[in]pffunction to call
Returns
the stream

◆ operator<<() [16/22]

ostream & ostream::operator<< ( short  arg)
inline

Output signed short

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [17/22]

ostream & ostream::operator<< ( signed char  arg)
inline

Output character

Parameters
[in]argcharacter to output
Returns
the stream

◆ operator<<() [18/22]

ostream & ostream::operator<< ( unsigned char  arg)
inline

Output character

Parameters
[in]argcharacter to output
Returns
the stream

◆ operator<<() [19/22]

ostream & ostream::operator<< ( unsigned int  arg)
inline

Output unsigned int

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [20/22]

ostream & ostream::operator<< ( unsigned long  arg)
inline

Output unsigned long

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [21/22]

ostream & ostream::operator<< ( unsigned long long  arg)
inline

Output unsigned long long

Parameters
[in]argvalue to output
Returns
the stream

◆ operator<<() [22/22]

ostream & ostream::operator<< ( unsigned short  arg)
inline

Output unsigned short

Parameters
[in]argvalue to output
Returns
the stream

◆ put()

ostream & ostream::put ( char  ch)
inline

Puts a character in a stream.

The unformatted output function inserts the element ch. It returns *this.

Parameters
[in]chThe character
Returns
A reference to the ostream object.

◆ putBool()

void ostream::putBool ( bool  b)
private

◆ putChar()

void ostream::putChar ( char  c)
private

◆ putDouble()

void ostream::putDouble ( double  n)
private

◆ putNum() [1/5]

void ostream::putNum ( int32_t  n)
private

◆ putNum() [2/5]

void ostream::putNum ( int64_t  n)
private

◆ putNum() [3/5]

template<typename T >
void ostream::putNum ( n,
bool  neg 
)
inlineprivate

◆ putNum() [4/5]

void ostream::putNum ( uint32_t  n)
inlineprivate

◆ putNum() [5/5]

void ostream::putNum ( uint64_t  n)
inlineprivate

◆ putPgm()

void ostream::putPgm ( const char *  str)
private

◆ putStr()

void ostream::putStr ( const char *  str)
private

◆ seekp() [1/2]

ostream & ostream::seekp ( off_type  off,
seekdir  way 
)
inline

Set the stream position.

Parameters
[in]offAn offset to move the write pointer relative to way. off is a signed 32-bit int so the offset is limited to +- 2GB.
[in]wayOne of ios::beg, ios::cur, or ios::end.
Returns
Is always *this. Failure is indicated by the state of *this.

◆ seekp() [2/2]

ostream & ostream::seekp ( pos_type  pos)
inline

Set the stream position

Parameters
[in]posThe absolute position in which to move the write pointer.
Returns
Is always *this. Failure is indicated by the state of *this.

◆ tellp()

pos_type ostream::tellp ( )
inline
Returns
the stream position

The documentation for this class was generated from the following files: