RInside Version 0.2.16
foo.h
Go to the documentation of this file.
1
#pragma once
2
/*
3
* These are just two example classes that will be communicated between program and rserver.
4
*
5
* See common/binarystream.h/.cpp for information about serialization,
6
* see foo_rcpp_wrapper_*.h for code that converts these objects into R objects and back.
7
*/
8
9
#include "
common/binarystream.h
"
10
#include <string>
11
#include <cstdint>
12
13
14
/*
15
* Foo just contains a name and two numbers.
16
*/
17
class
Foo
{
18
public
:
19
Foo
(
const
std::string &
name
, int32_t
a
, int32_t
b
);
20
~Foo
();
21
22
std::string
name
;
23
int32_t
a
,
b
;
24
25
// These three are for IPC
26
static
const
int32_t
TYPEID
= 1;
27
void
serialize
(
BinaryStream
&stream)
const
;
28
static
Foo
deserialize
(
BinaryStream
&stream);
29
};
Foo::TYPEID
static const int32_t TYPEID
Definition:
foo.h:26
Foo
Definition:
foo.h:17
Foo::name
std::string name
Definition:
foo.h:22
binarystream.h
Foo::Foo
Foo(const std::string &name, int32_t a, int32_t b)
Definition:
foo.cpp:4
Foo::a
int32_t a
Definition:
foo.h:23
BinaryStream
Definition:
binarystream.h:45
Foo::b
int32_t b
Definition:
foo.h:23
Foo::~Foo
~Foo()
Definition:
foo.cpp:8
Foo::deserialize
static Foo deserialize(BinaryStream &stream)
Definition:
foo.cpp:19
Foo::serialize
void serialize(BinaryStream &stream) const
Definition:
foo.cpp:12
inst
examples
sandboxed_server
datatypes
foo.h
Generated on Wed Mar 11 2020 22:27:24 for RInside Version 0.2.16 by
1.8.13