Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | List of all members
SR::InputStream< StreamType > Class Template Reference

Template class to wrap data stream to a listener object. More...

#include <inputstream.h>

Public Member Functions

 ~InputStream ()
 Cleans up the associated StreamType stream. More...
 
void set (std::shared_ptr< StreamType > input)
 Must be set to allow proper cleanup of internal stream. More...
 

Detailed Description

template<typename StreamType>
class SR::InputStream< StreamType >

Template class to wrap data stream to a listener object.

Template Parameters
StreamTypeshould be a stream object with a stopListening() function such as a GenericStream implementation

This should be a member of any listener implementation!

Constructor & Destructor Documentation

◆ ~InputStream()

template<typename StreamType >
SR::InputStream< StreamType >::~InputStream ( )
inline

Cleans up the associated StreamType stream.

Member Function Documentation

◆ set()

template<typename StreamType >
void SR::InputStream< StreamType >::set ( std::shared_ptr< StreamType >  input)
inline

Must be set to allow proper cleanup of internal stream.

Parameters
inputstream of StreamType to be cleaned up after destruction

All implementations of SR listeners should call this function as part of their constructor. Doing so ensures that the stream is stopped and cleaned up correctly. Alternatively, users can call stopListening on the stream themselves.


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