RInside Version 0.2.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rinsideserver.cpp File Reference
#include <RInside.h>
#include "rinsideserver.h"
#include "internalfunction_clone.h"
#include <stdexcept>
#include <fstream>
Include dependency graph for rinsideserver.cpp:

Go to the source code of this file.

Macros

#define LOG(...)   {fprintf(stderr, "%d: ", getpid());fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");}
 
#define CMD_TRY   try {
 
#define CMD_CATCH   } catch (const BinaryStream::stream_exception) { throw; } catch (const std::exception &e) { std::string s = e.what(); LOG("Command failed: %s", s.c_str()); sendReply(RIS_REPLY_ERROR); stream.write(s); }
 

Functions

static void replace_all (std::string &str, const std::string &search, const std::string &replace)
 
static std::string read_file_as_string (const std::string &filename)
 

Macro Definition Documentation

#define CMD_CATCH   } catch (const BinaryStream::stream_exception) { throw; } catch (const std::exception &e) { std::string s = e.what(); LOG("Command failed: %s", s.c_str()); sendReply(RIS_REPLY_ERROR); stream.write(s); }

Definition at line 59 of file rinsideserver.cpp.

Referenced by RInsideServer::run().

#define CMD_TRY   try {

Definition at line 58 of file rinsideserver.cpp.

Referenced by RInsideServer::run().

#define LOG (   ...)    {fprintf(stderr, "%d: ", getpid());fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");}

Function Documentation

static std::string read_file_as_string ( const std::string &  filename)
static

Definition at line 25 of file rinsideserver.cpp.

Referenced by RInsideServer::run().

static void replace_all ( std::string &  str,
const std::string &  search,
const std::string &  replace 
)
static

Definition at line 17 of file rinsideserver.cpp.

Referenced by RInsideServer::run().