Max OS 0.3
Loading...
Searching...
No Matches
inputStream.h File Reference

Defines a generic input stream and related classes for handling input data streams. More...

#include <cstdint>
#include <common/vector.h>
#include <common/string.h>

Go to the source code of this file.

Classes

class  MaxOS::common::InputStreamEventHandler< Type >
 Handles read and end of stream events from a set of streams. More...
 
class  MaxOS::common::InputStreamProcessor< Type, ProcessorType >
 Converts one stream data type into another. More...
 
class  MaxOS::common::InputStreamSocket< Type >
 Passes read events on to the handlers. More...
 
class  MaxOS::common::InputStreamBuffer< Type >
 Buffers data from a stream and fires an event when a certain element is read. More...
 
class  MaxOS::common::GenericInputStream< Type >
 Manages the connection of a stream to handlers. More...
 
class  MaxOS::common::InputStream
 A stream that handles strings. More...
 

Functions

template<class Type >
void MaxOS::common::operator>> (GenericInputStream< Type > &source, InputStreamEventHandler< Type > &input_stream_event_handler)
 The ">>" operator is used to read data from a stream, it takes a stream to read from and an event handler to handle the data.
 
template<class Type , class ProcessorType >
GenericInputStream< ProcessorType > & MaxOS::common::operator>> (GenericInputStream< Type > &source, InputStreamProcessor< Type, ProcessorType > &processor)
 The ">>" operator is used to read data from a stream, it takes a stream to read from and an InputStreamProcessor to process the data.
 

Detailed Description

Defines a generic input stream and related classes for handling input data streams.

Date
12th April 2023
Author
Max Tyson
Todo:
Move tempalte implmentations to a cpp file

Definition in file inputStream.h.

Function Documentation

◆ operator>>() [1/2]

template<class Type >
void MaxOS::common::operator>> ( GenericInputStream< Type > &  source,
InputStreamEventHandler< Type > &  input_stream_event_handler 
)

The ">>" operator is used to read data from a stream, it takes a stream to read from and an event handler to handle the data.

Template Parameters
TypeThe type of data the stream is handling
Parameters
sourceThe stream to read from
input_stream_event_handlerThe event handler to handle the data

◆ operator>>() [2/2]

template<class Type , class ProcessorType >
GenericInputStream< ProcessorType > & MaxOS::common::operator>> ( GenericInputStream< Type > &  source,
InputStreamProcessor< Type, ProcessorType > &  processor 
)

The ">>" operator is used to read data from a stream, it takes a stream to read from and an InputStreamProcessor to process the data.

Template Parameters
TypeThe type of data the stream is handling
ProcessorTypeThe type of data to convert the data into via the processor
Parameters
sourceThe stream to read from
processorThe processor to process the data
Returns
The processed stream