ESyS-Particle
2.3.4
packed_message_interface.h
Go to the documentation of this file.
1
// //
3
// Copyright (c) 2003-2017 by The University of Queensland //
4
// Centre for Geoscience Computing //
5
// http://earth.uq.edu.au/centre-geoscience-computing //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.apache.org/licenses/LICENSE-2.0 //
10
// //
12
13
#ifndef __PACKED_MESSAGE_INTERFACE_H
14
#define __PACKED_MESSAGE_INTERFACE_H
15
16
//--- project includes ---
17
#include "
Foundation/vec3.h
"
// for append(Vec3), pop_vec3()
18
19
//--- STL includes ---
20
#include <string>
21
using
std::string;
22
28
class
TML_PackedMessageInterface
29
{
30
public
:
31
virtual
void
begin_pack
()=0;
32
virtual
void
begin_unpack
()=0;
33
virtual
void
append
(
int
)=0;
34
virtual
void
append
(
double
)=0;
35
virtual
void
append
(
const
string
&)=0;
36
virtual
void
append
(
const
Vec3
&)=0;
37
virtual
void
append
(
bool
)=0;
38
39
virtual
int
pop_int
()=0;
40
virtual
double
pop_double
()=0;
41
virtual
void
pop_doubles
(
double
*,
int
)=0;
42
virtual
string
pop_string
()=0;
43
virtual
Vec3
pop_vec3
()=0;
44
virtual
bool
pop_bool
()=0;
45
46
template
<
typename
T>
void
pack
(
const
T&);
47
template
<
typename
T>
void
unpack
(T&);
48
};
49
50
#endif //__PACKED_MESSAGE_INTERFACE_H
TML_PackedMessageInterface
Abstract base/interface class for packed messages to be used in TML_Pack.
Definition:
packed_message_interface.h:28
TML_PackedMessageInterface::begin_pack
virtual void begin_pack()=0
TML_PackedMessageInterface::unpack
void unpack(T &)
TML_PackedMessageInterface::pop_vec3
virtual Vec3 pop_vec3()=0
TML_PackedMessageInterface::pop_int
virtual int pop_int()=0
TML_PackedMessageInterface::pack
void pack(const T &)
TML_PackedMessageInterface::pop_double
virtual double pop_double()=0
TML_PackedMessageInterface::pop_doubles
virtual void pop_doubles(double *, int)=0
TML_PackedMessageInterface::append
virtual void append(int)=0
Vec3
Definition:
vec3.h:46
TML_PackedMessageInterface::pop_bool
virtual bool pop_bool()=0
vec3.h
TML_PackedMessageInterface::begin_unpack
virtual void begin_unpack()=0
TML_PackedMessageInterface::pop_string
virtual string pop_string()=0
tml
message
packed_message_interface.h
Generated by
1.8.16