RInside Version 0.2.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
bar.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 binarystream.h/.cpp for information about serialization,
6  * see bar_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 #include "foo.h"
14 
15 
16 /*
17  * Bar contains a name and a Foo object, because recursive data structures are fun!
18  */
19 class Bar {
20  public:
21  Bar(const std::string &name, const Foo &foo);
22  ~Bar();
23 
24  std::string name;
26 
27  // These three are for IPC
28  static const int32_t TYPEID = 2;
29  void serialize(BinaryStream &stream) const;
30  static Bar deserialize(BinaryStream &stream);
31 };
Definition: foo.h:17
static const int32_t TYPEID
Definition: bar.h:28
Bar(const std::string &name, const Foo &foo)
Definition: bar.cpp:3
Definition: bar.h:19
static Bar deserialize(BinaryStream &stream)
Definition: bar.cpp:15
~Bar()
Definition: bar.cpp:6
std::string name
Definition: bar.h:24
Foo foo
Definition: bar.h:25
void serialize(BinaryStream &stream) const
Definition: bar.cpp:10