Luanti 5.16.0-dev
 
Loading...
Searching...
No Matches
SSCSMController Class Reference

The purpose of this class is to: More...

#include <sscsm_controller.h>

+ Collaboration diagram for SSCSMController:

Public Member Functions

 SSCSMController (std::unique_ptr< SSCSMEnvironment > thread, std::shared_ptr< StupidChannel > channel)
 
 ~SSCSMController ()
 
 DISABLE_CLASS_COPY (SSCSMController)
 
void runEvent (Client *client, std::unique_ptr< ISSCSMEvent > event)
 

Static Public Member Functions

static std::unique_ptr< SSCSMControllercreate ()
 

Private Member Functions

SerializedSSCSMAnswer handleRequest (Client *client, ISSCSMRequest *req)
 

Private Attributes

std::unique_ptr< SSCSMEnvironmentm_thread
 
std::shared_ptr< StupidChannelm_channel
 

Detailed Description

The purpose of this class is to:

  • Be the RAII owner of the SSCSM process.
  • Send events to SSCSM process, and process requests. (runEvent)
  • Hide details (e.g. that it is a separate process, or that it has to do IPC calls).

See also SSCSMEnvironment for other side.

Constructor & Destructor Documentation

◆ SSCSMController()

SSCSMController::SSCSMController ( std::unique_ptr< SSCSMEnvironment > thread,
std::shared_ptr< StupidChannel > channel )

◆ ~SSCSMController()

SSCSMController::~SSCSMController ( )

References m_channel, m_thread, SSCSMRequestPollNextEvent::Answer::next_event, StupidChannel::sendB(), serializeSSCSMAnswer(), Thread::stop(), and Thread::wait().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

std::unique_ptr< SSCSMController > SSCSMController::create ( )
static

References deserializeSSCSMRequest(), and FATAL_ERROR_IF.

Referenced by Client::Client().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DISABLE_CLASS_COPY()

SSCSMController::DISABLE_CLASS_COPY ( SSCSMController )

◆ handleRequest()

SerializedSSCSMAnswer SSCSMController::handleRequest ( Client * client,
ISSCSMRequest * req )
private

References ISSCSMRequest::exec().

Referenced by runEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runEvent()

void SSCSMController::runEvent ( Client * client,
std::unique_ptr< ISSCSMEvent > event )

References deserializeSSCSMRequest(), StupidChannel::exchangeB(), handleRequest(), m_channel, SSCSMRequestPollNextEvent::Answer::next_event, and serializeSSCSMAnswer().

Referenced by Client::Client().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channel

std::shared_ptr<StupidChannel> SSCSMController::m_channel
private

Referenced by ~SSCSMController(), and runEvent().

◆ m_thread

std::unique_ptr<SSCSMEnvironment> SSCSMController::m_thread
private

Referenced by ~SSCSMController().


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