RInside Version 0.2.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
foo.cpp
Go to the documentation of this file.
1 
2 #include "foo.h"
3 
4 Foo::Foo(const std::string &name, int32_t a, int32_t b) : name(name), a(a), b(b) {
5 
6 }
7 
9 
10 }
11 
12 void Foo::serialize(BinaryStream &stream) const {
13  stream.write(name);
14  stream.write(a);
15  stream.write(b);
16 }
17 
18 
20  auto name = stream.read<std::string>();
21  auto a = stream.read<int32_t>();
22  auto b = stream.read<int32_t>();
23  return Foo(name, a, b);
24 }
25 
Definition: foo.h:17
std::string name
Definition: foo.h:22
void write(const char *buffer, size_t len)
Foo(const std::string &name, int32_t a, int32_t b)
Definition: foo.cpp:4
int32_t a
Definition: foo.h:23
int32_t b
Definition: foo.h:23
void serialize(BinaryStream &stream) const
Definition: foo.cpp:12
~Foo()
Definition: foo.cpp:8
size_t read(char *buffer, size_t len)
static Foo deserialize(BinaryStream &stream)
Definition: foo.cpp:19