Flutter Engine
 
Loading...
Searching...
No Matches
fml::SyncSwitch::Handlers Struct Reference

Represents the 2 code paths available when calling |SyncSwitchExecute|. More...

#include <sync_switch.h>

Public Member Functions

HandlersSetIfTrue (const std::function< void()> &handler)
 Sets the handler that will be executed if the |SyncSwitch| is true.
 
HandlersSetIfFalse (const std::function< void()> &handler)
 Sets the handler that will be executed if the |SyncSwitch| is false.
 

Public Attributes

std::function< void()> true_handler = [] {}
 
std::function< void()> false_handler = [] {}
 

Detailed Description

Represents the 2 code paths available when calling |SyncSwitchExecute|.

Definition at line 35 of file sync_switch.h.

Member Function Documentation

◆ SetIfFalse()

SyncSwitch::Handlers & fml::SyncSwitch::Handlers::SetIfFalse ( const std::function< void()> &  handler)

Sets the handler that will be executed if the |SyncSwitch| is false.

Definition at line 18 of file sync_switch.cc.

19 {
21 return *this;
22}
const gchar FlBinaryMessengerMessageHandler handler
std::function< void()> false_handler
Definition sync_switch.h:43

References handler.

Referenced by impeller::ContextMTL::FlushTasksAwaitingGPU().

◆ SetIfTrue()

SyncSwitch::Handlers & fml::SyncSwitch::Handlers::SetIfTrue ( const std::function< void()> &  handler)

Sets the handler that will be executed if the |SyncSwitch| is true.

Definition at line 12 of file sync_switch.cc.

13 {
15 return *this;
16}
std::function< void()> true_handler
Definition sync_switch.h:42

References handler, and true_handler.

Member Data Documentation

◆ false_handler

std::function<void()> fml::SyncSwitch::Handlers::false_handler = [] {}

Definition at line 43 of file sync_switch.h.

43{};

Referenced by fml::SyncSwitch::Execute().

◆ true_handler

std::function<void()> fml::SyncSwitch::Handlers::true_handler = [] {}

Definition at line 42 of file sync_switch.h.

42{};

Referenced by fml::SyncSwitch::Execute(), and SetIfTrue().


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