RInside Version 0.2.16
RInsideServer Class Reference

#include <rinsideserver.h>

Collaboration diagram for RInsideServer:

Public Member Functions

 RInsideServer (BinaryStream &stream, RInside &R, RInsideCallbacks &Rcallbacks)
 
 ~RInsideServer ()
 
void run ()
 

Static Public Member Functions

static void registerDefaultTypes ()
 
template<typename T >
static void registerType ()
 

Private Member Functions

SEXP sexp_from_stream ()
 
void sexp_to_stream (SEXP, int32_t type, bool include_reply=false)
 
void sendReply (char reply)
 
void allowSendReply ()
 

Private Attributes

BinaryStream stream
 
RInsideR
 
RInsideCallbacksRcallbacks
 
bool can_send_reply
 

Static Private Attributes

static std::map< int32_t, std::function< SEXP(BinaryStream &)> > registry_sexp_from_stream
 
static std::map< int32_t, std::function< void(RInsideServer &, SEXP, bool)> > registry_sexp_to_stream
 

Friends

class CppFunctionForRInsideServer
 

Detailed Description

Definition at line 19 of file rinsideserver.h.

Constructor & Destructor Documentation

◆ RInsideServer()

RInsideServer::RInsideServer ( BinaryStream stream,
RInside R,
RInsideCallbacks Rcallbacks 
)

Definition at line 45 of file rinsideserver.cpp.

◆ ~RInsideServer()

RInsideServer::~RInsideServer ( )

Definition at line 49 of file rinsideserver.cpp.

Member Function Documentation

◆ allowSendReply()

void RInsideServer::allowSendReply ( )
inlineprivate

Definition at line 36 of file rinsideserver.h.

Referenced by CppFunctionForRInsideServer::operator()(), and run().

◆ registerDefaultTypes()

void RInsideServer::registerDefaultTypes ( )
static

Definition at line 202 of file rinsideserver.cpp.

Referenced by main().

◆ registerType()

template<typename T >
static void RInsideServer::registerType ( )
inlinestatic

Definition at line 44 of file rinsideserver.h.

References BinaryStream::read(), RIS_REPLY_VALUE, sendReply(), stream, and BinaryStream::write().

Here is the call graph for this function:

◆ run()

◆ sendReply()

void RInsideServer::sendReply ( char  reply)
inlineprivate

Definition at line 35 of file rinsideserver.h.

References BinaryStream::write().

Referenced by CppFunctionForRInsideServer::operator()(), registerType(), and run().

Here is the call graph for this function:

◆ sexp_from_stream()

SEXP RInsideServer::sexp_from_stream ( )
private

Definition at line 182 of file rinsideserver.cpp.

References LOG, BinaryStream::read(), registry_sexp_from_stream, and stream.

Referenced by CppFunctionForRInsideServer::operator()(), and run().

Here is the call graph for this function:

◆ sexp_to_stream()

void RInsideServer::sexp_to_stream ( SEXP  sexp,
int32_t  type,
bool  include_reply = false 
)
private

Definition at line 193 of file rinsideserver.cpp.

References LOG, and registry_sexp_to_stream.

Referenced by CppFunctionForRInsideServer::operator()(), and run().

Friends And Related Function Documentation

◆ CppFunctionForRInsideServer

friend class CppFunctionForRInsideServer
friend

Definition at line 68 of file rinsideserver.h.

Member Data Documentation

◆ can_send_reply

bool RInsideServer::can_send_reply
private

Definition at line 34 of file rinsideserver.h.

◆ R

RInside& RInsideServer::R
private

Definition at line 31 of file rinsideserver.h.

Referenced by run().

◆ Rcallbacks

RInsideCallbacks& RInsideServer::Rcallbacks
private

Definition at line 32 of file rinsideserver.h.

Referenced by run().

◆ registry_sexp_from_stream

std::map< int32_t, std::function< SEXP(BinaryStream &)> > RInsideServer::registry_sexp_from_stream
staticprivate

Definition at line 38 of file rinsideserver.h.

Referenced by read_file_as_string(), and sexp_from_stream().

◆ registry_sexp_to_stream

std::map< int32_t, std::function< void(RInsideServer &, SEXP, bool)> > RInsideServer::registry_sexp_to_stream
staticprivate

Definition at line 39 of file rinsideserver.h.

Referenced by read_file_as_string(), and sexp_to_stream().

◆ stream

BinaryStream RInsideServer::stream
private

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