Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
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 15 of file sync_switch.cc.

16 {
17 false_handler = handler;
18 return *this;
19}
std::function< void()> false_handler
Definition sync_switch.h:43

◆ 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 9 of file sync_switch.cc.

10 {
11 true_handler = handler;
12 return *this;
13}
std::function< void()> true_handler
Definition sync_switch.h:42

Member Data Documentation

◆ false_handler

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

Definition at line 43 of file sync_switch.h.

43{};

◆ true_handler

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

Definition at line 42 of file sync_switch.h.

42{};

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