ESyS-Particle  2.3
packed_message_interface.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 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.opensource.org/licenses/osl-3.0.php //
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 
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
virtual void pop_doubles(double *, int)=0
Definition: vec3.h:46
virtual double pop_double()=0
virtual Vec3 pop_vec3()=0
virtual string pop_string()=0
virtual bool pop_bool()=0
virtual void begin_pack()=0
virtual void begin_unpack()=0
virtual void append(int)=0
Abstract base/interface class for packed messages to be used in TML_Pack.
Definition: packed_message_interface.h:28