Blame view

src/ParamGetImpl/DDServerInterface/Packet.hh 1.37 KB
fbe3c2bb   Benjamin Renard   First commit
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
/*
 * Packet.hh
 *
 *  Created on: Jan 17, 2013
 *      Author: f.casimir
 */

#ifndef PACKET_HH_
#define PACKET_HH_

#include <boost/shared_ptr.hpp>

#include "DD.hh"

namespace AMDA {
	namespace DDServerInterface {
		namespace VI {
			/**
			 * @class Packet
			 * @brief Container of one bloc of time and one block of data get from DDServer.
			 * @details When a call to GetData is done the the data retrieved are shared between listener.
			 * For this we use pointers boost::shared_ptr.
			 */
			class Packet {
			public:
				typedef boost::shared_ptr<DD_data_t>  DDDataSPtr;
a6490f4d   Benjamin Renard   Do not throw an e...
27
				Packet() : time(), data(), nodata(true), startTime(0), stopTime(0) {}
fbe3c2bb   Benjamin Renard   First commit
28
29
30
				/**
				 * @brief Constructor.
				 */
a6490f4d   Benjamin Renard   Do not throw an e...
31
				Packet(Packet::DDDataSPtr pTime,Packet::DDDataSPtr pData) : time(pTime), data(pData), nodata(false), startTime(0), stopTime(0) {}
fbe3c2bb   Benjamin Renard   First commit
32
33
34
				/**
				 * @brief Copy constructor.
				 */
a6490f4d   Benjamin Renard   Do not throw an e...
35
				Packet(const Packet& pPacket) : time(pPacket.time), data(pPacket.data), nodata(false), startTime(0), stopTime(0) {}
fbe3c2bb   Benjamin Renard   First commit
36
37
38
39
40
41
42
				/**
				 * @brief Destructor.
				 */
				virtual ~Packet() {}

				DDDataSPtr time; /*!< Shared pointer on one block data of time */
				DDDataSPtr data; /*!< Shared pointer on one block data of an unknown data type */
a6490f4d   Benjamin Renard   Do not throw an e...
43
44
45
				bool nodata;
				double startTime;
				double stopTime;
fbe3c2bb   Benjamin Renard   First commit
46
47
48
49
50
51
			};

		} /* namespace VI */
	} /* namespace DDServerInterface */
} /* namespace AMDA */
#endif /* PACKET_HH_ */