21 #ifndef INCLUDE_OLA_IO_OUTPUTSTREAM_H_ 22 #define INCLUDE_OLA_IO_OUTPUTSTREAM_H_ 26 #include <ola/io/OutputBuffer.h> 40 virtual void Write(
const uint8_t *data,
unsigned int length) = 0;
63 void Write(
const uint8_t *data,
unsigned int length) {
64 m_buffer->Write(data, length);
67 OutputStream& operator<<(uint8_t val) {
return Write(val); }
68 OutputStream& operator<<(uint16_t val) {
return Write(val); }
69 OutputStream& operator<<(uint32_t val) {
return Write(val); }
70 OutputStream& operator<<(int8_t val) {
return Write(val); }
71 OutputStream& operator<<(int16_t val) {
return Write(val); }
72 OutputStream& operator<<(int32_t val) {
return Write(val); }
79 m_buffer->Write(reinterpret_cast<const uint8_t*>(&val),
80 static_cast<unsigned int>(
sizeof(val)));
88 #endif // INCLUDE_OLA_IO_OUTPUTSTREAM_H_ Definition: OutputStream.h:35
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
Definition: OutputBuffer.h:36
Definition: OutputStream.h:54
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44