RInside Version 0.2.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
bar.cpp
Go to the documentation of this file.
1 #include "bar.h"
2 
3 Bar::Bar(const std::string &name, const Foo &foo) : name(name), foo(foo) {
4 
5 }
7 
8 }
9 
10 void Bar::serialize(BinaryStream &stream) const {
11  stream.write(name);
12  stream.write(foo);
13 }
14 
16  auto name = stream.read<std::string>();
17  auto foo = stream.read<Foo>();
18  return Bar(name, foo);
19 }
Definition: foo.h:17
void write(const char *buffer, size_t len)
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
size_t read(char *buffer, size_t len)