From 4576d8746c03d1179d70d7f0a318218484ba2cb2 Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Mon, 26 Nov 2012 16:01:26 -0300 Subject: [PATCH] Added another constructor to Packet. --- include/packet.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/packet.h b/include/packet.h index 4b779c9..2e56939 100644 --- a/include/packet.h +++ b/include/packet.h @@ -125,6 +125,14 @@ public: Packet() : pdu_(0) { } + /** + * \brief Constructs a Packet from a PDU* and a Timestamp. + * + * The PDU* is cloned using PDU::clone. + */ + Packet(PDU *apdu, const Timestamp &tstamp) + : pdu_(apdu->clone()), ts(tstamp) {} + /** * \brief Constructs a Packet from a RefPacket. *