1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
/////////////////////////////////////////////////////////////
// //
// Copyright (c) 2003-2014 by The University of Queensland //
// Centre for Geoscience Computing //
// http://earth.uq.edu.au/centre-geoscience-computing //
// //
// Primary Business: Brisbane, Queensland, Australia //
// Licensed under the Open Software License version 3.0 //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
/////////////////////////////////////////////////////////////
#ifndef __MULTI_MESSAGE_SLAB_H
#define __MULTI_MESSAGE_SLAB_H
//--- MPI ---
#include <mpi.h>
//--- project includes---
#include "tml/message/packed_message_interface.h"
#include "Foundation/vec3.h" // for append(Vec3), pop_vec3()
//--- forward declarations ---
class TML_PackedMultiMessage;
/*!
\class TML_PackedMultiMessageSlab
\brief Handle class to access multimessages via a packed message interface
*/
class TML_PackedMultiMessageSlab : public TML_PackedMessageInterface
{
private:
TML_PackedMultiMessage *m_msg;
int m_idx;
public:
TML_PackedMultiMessageSlab(TML_PackedMultiMessage*,int);
virtual void begin_pack();
virtual void begin_unpack();
virtual void append(int);
virtual void append(double);
virtual void append(const string&);
virtual void append(const Vec3&);
virtual void append(bool);
virtual int pop_int();
virtual double pop_double();
virtual void pop_doubles(double*,int);
virtual string pop_string();
virtual Vec3 pop_vec3();
virtual bool pop_bool();
};
#endif //__MULTI_MESSAGE_SLAB_H
|