Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
flutter::StreamHandlerFunctions< T > Class Template Reference

#include <event_stream_handler_functions.h>

Inheritance diagram for flutter::StreamHandlerFunctions< T >:
flutter::StreamHandler< EncodableValue >

Public Member Functions

 StreamHandlerFunctions (StreamHandlerListen< T > on_listen, StreamHandlerCancel< T > on_cancel)
 
virtual ~StreamHandlerFunctions ()=default
 
 StreamHandlerFunctions (StreamHandlerFunctions const &)=delete
 
StreamHandlerFunctionsoperator= (StreamHandlerFunctions const &)=delete
 
- Public Member Functions inherited from flutter::StreamHandler< EncodableValue >
 StreamHandler ()=default
 
 StreamHandler (StreamHandler const &)=delete
 
virtual ~StreamHandler ()=default
 
StreamHandleroperator= (StreamHandler const &)=delete
 
std::unique_ptr< StreamHandlerError< EncodableValue > > OnListen (const EncodableValue *arguments, std::unique_ptr< EventSink< EncodableValue > > &&events)
 
std::unique_ptr< StreamHandlerError< EncodableValue > > OnCancel (const EncodableValue *arguments)
 

Protected Member Functions

std::unique_ptr< StreamHandlerError< T > > OnListenInternal (const T *arguments, std::unique_ptr< EventSink< T > > &&events) override
 
std::unique_ptr< StreamHandlerError< T > > OnCancelInternal (const T *arguments) override
 
- Protected Member Functions inherited from flutter::StreamHandler< EncodableValue >
virtual std::unique_ptr< StreamHandlerError< EncodableValue > > OnListenInternal (const EncodableValue *arguments, std::unique_ptr< EventSink< EncodableValue > > &&events)=0
 
virtual std::unique_ptr< StreamHandlerError< EncodableValue > > OnCancelInternal (const EncodableValue *arguments)=0
 

Protected Attributes

StreamHandlerListen< Ton_listen_
 
StreamHandlerCancel< Ton_cancel_
 

Detailed Description

template<typename T = EncodableValue>
class flutter::StreamHandlerFunctions< T >

Definition at line 32 of file event_stream_handler_functions.h.

Constructor & Destructor Documentation

◆ StreamHandlerFunctions() [1/2]

template<typename T = EncodableValue>
flutter::StreamHandlerFunctions< T >::StreamHandlerFunctions ( StreamHandlerListen< T on_listen,
StreamHandlerCancel< T on_cancel 
)
inline

Definition at line 36 of file event_stream_handler_functions.h.

38 : on_listen_(on_listen), on_cancel_(on_cancel) {}

◆ ~StreamHandlerFunctions()

template<typename T = EncodableValue>
virtual flutter::StreamHandlerFunctions< T >::~StreamHandlerFunctions ( )
virtualdefault

◆ StreamHandlerFunctions() [2/2]

template<typename T = EncodableValue>
flutter::StreamHandlerFunctions< T >::StreamHandlerFunctions ( StreamHandlerFunctions< T > const &  )
delete

Member Function Documentation

◆ OnCancelInternal()

template<typename T = EncodableValue>
std::unique_ptr< StreamHandlerError< T > > flutter::StreamHandlerFunctions< T >::OnCancelInternal ( const T arguments)
inlineoverrideprotected

Definition at line 61 of file event_stream_handler_functions.h.

62 {
63 if (on_cancel_) {
64 return on_cancel_(arguments);
65 }
66
67 auto error = std::make_unique<StreamHandlerError<T>>(
68 "error", "No OnCancel handler set", nullptr);
69 return std::move(error);
70 }
const uint8_t uint32_t uint32_t GError ** error

◆ OnListenInternal()

template<typename T = EncodableValue>
std::unique_ptr< StreamHandlerError< T > > flutter::StreamHandlerFunctions< T >::OnListenInternal ( const T arguments,
std::unique_ptr< EventSink< T > > &&  events 
)
inlineoverrideprotected

Definition at line 48 of file event_stream_handler_functions.h.

50 {
51 if (on_listen_) {
52 return on_listen_(arguments, std::move(events));
53 }
54
55 auto error = std::make_unique<StreamHandlerError<T>>(
56 "error", "No OnListen handler set", nullptr);
57 return std::move(error);
58 }

◆ operator=()

template<typename T = EncodableValue>
StreamHandlerFunctions & flutter::StreamHandlerFunctions< T >::operator= ( StreamHandlerFunctions< T > const &  )
delete

Member Data Documentation

◆ on_cancel_

template<typename T = EncodableValue>
StreamHandlerCancel<T> flutter::StreamHandlerFunctions< T >::on_cancel_
protected

Definition at line 73 of file event_stream_handler_functions.h.

◆ on_listen_

template<typename T = EncodableValue>
StreamHandlerListen<T> flutter::StreamHandlerFunctions< T >::on_listen_
protected

Definition at line 72 of file event_stream_handler_functions.h.


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