modm API documentation
modm::IOStream Class Reference

#include <modm/io/iostream.hpp>

Inheritance diagram for modm::IOStream:
modm::CharacterDisplay modm::GraphicDisplay modm::log::Logger modm::Hd44780< DATA, RW, RS, E > modm::Hd44780Dual< DATA, RW, RS, E1, E2 > modm::St7036< SPI, CS, RS, Width, Heigth > modm::St7036< SPI, CS, RS, 16, 2 > modm::St7036< SPI, CS, RS, 16, 3 > modm::St7036< SPI, CS, RS, 8, 1 > modm::ColorGraphicDisplay modm::MonochromeGraphicDisplay< Width, Height, BufferWidth, BufferHeight > modm::MonochromeGraphicDisplay< Width, Height, Width, Height/8 > modm::MonochromeGraphicDisplay< Width, Height, Width/8, Height >

Public Member Functions

 IOStream (IODevice &odevice)
 
IOStream & write (char c)
 
IOStream & get (char &c)
 Reads one character and returns it if available. Otherwise, returns IOStream::eof.
 
IOStream & get (char *s, size_t n)
 
template<size_t N>
IOStream & get (char (&s)[N])
 
IOStream & flush ()
 
IOStream & endl ()
 
IOStream & bin ()
 set the output mode to binary style for integer types
 
IOStream & hex ()
 set the output mode to hexadecimal style for integer types
 
IOStream & ascii ()
 set the output mode to ASCII style for integer types
 
IOStream & operator<< (const bool &v)
 
IOStream & operator<< (const char &v)
 
IOStream & operator<< (const uint8_t &v)
 
IOStream & operator<< (const int16_t &v)
 
IOStream & operator<< (const uint16_t &v)
 
IOStream & operator<< (const int32_t &v)
 
IOStream & operator<< (const uint32_t &v)
 
IOStream & operator<< (const int64_t &v)
 
IOStream & operator<< (const uint64_t &v)
 
IOStream & operator<< (const int &v)
 
IOStream & operator<< (const unsigned int &v)
 
IOStream & operator<< (const float &v)
 
IOStream & operator<< (const double &v)
 
IOStream & operator<< (const char *s)
 
IOStream & operator<< (const void *p)
 write the hex value of a pointer
 
template<class Ret , class... Args>
IOStream & operator<< (Ret (*pointer)(Args...))
 Write the hex value of any function pointer.
 
IOStream & operator<< (IOStream &(*format)(IOStream &))
 
IOStream & printf (const char *fmt,...)))
 
IOStream & vprintf (const char *fmt, va_list vlist)))
 

Static Public Attributes

static constexpr char eof = -1
 

Protected Member Functions

template<typename T >
void writeIntegerMode (const T v)
 
void writeInteger (int16_t value)
 
void writeInteger (uint16_t value)
 
void writeInteger (int32_t value)
 
void writeInteger (uint32_t value)
 
void writeInteger (int64_t value)
 
void writeInteger (uint64_t value)
 
void writeFloat (float value)
 
void writeDouble (const double &value)
 
void writePointer (const void *value)
 
void writeHex (uint8_t value)
 
void writeBin (uint8_t value)
 

Detailed Description

Author
Martin Rosekeit martin.rosekeit@rwth-aachen.de
Niklas Hauser

Constructor & Destructor Documentation

modm::IOStream::IOStream ( IODevice odevice)
inline
Parameters
devicedevice to write the stream to
MyIODevice device;
IOStream stream( device );

Member Function Documentation

IOStream & modm::IOStream::get ( char *  s,
size_t  n 
)

reads characters into NULL delimited c string in contrast to the standard implementation, this does not care about newline characters in the input


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