yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::EditorControlQueue Class Reference

#include <editor_control_queue.h>

Classes

struct  Request
 

Public Member Functions

absl::StatusOr< std::string > Submit (std::string json, std::chrono::milliseconds queue_timeout=std::chrono::seconds(5))
 
void ProcessOne (const std::function< std::string(const std::string &)> &action)
 
bool pending () const
 

Private Attributes

std::mutex mutex_
 
std::queue< std::shared_ptr< Request > > requests_
 

Detailed Description

Definition at line 20 of file editor_control_queue.h.

Member Function Documentation

◆ Submit()

absl::StatusOr< std::string > yaze::app::EditorControlQueue::Submit ( std::string json,
std::chrono::milliseconds queue_timeout = std::chrono::seconds(5) )
inline

Definition at line 22 of file editor_control_queue.h.

References mutex_, and requests_.

Referenced by yaze::Controller::RequestEditorControl().

◆ ProcessOne()

void yaze::app::EditorControlQueue::ProcessOne ( const std::function< std::string(const std::string &)> & action)
inline

Definition at line 46 of file editor_control_queue.h.

References mutex_, and requests_.

Referenced by yaze::Controller::OnLoad().

◆ pending()

bool yaze::app::EditorControlQueue::pending ( ) const
inline

Definition at line 68 of file editor_control_queue.h.

References mutex_, and requests_.

Referenced by yaze::Controller::OnInput().

Member Data Documentation

◆ mutex_

std::mutex yaze::app::EditorControlQueue::mutex_
mutableprivate

Definition at line 80 of file editor_control_queue.h.

Referenced by pending(), ProcessOne(), and Submit().

◆ requests_

std::queue<std::shared_ptr<Request> > yaze::app::EditorControlQueue::requests_
private

Definition at line 81 of file editor_control_queue.h.

Referenced by pending(), ProcessOne(), and Submit().


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