libtins 4.5
|
Classes | |
struct | own_pdu |
Public Member Functions | |
Packet () | |
Default constructs a Packet. | |
Packet (const PDU *apdu, const Timestamp &tstamp) | |
Constructs a Packet from a PDU* and a Timestamp. | |
Packet (const PDU &apdu, const Timestamp &tstamp) | |
Constructs a Packet from a PDU& and a Timestamp. | |
Packet (PDU *apdu, const Timestamp &tstamp, own_pdu) | |
Constructs a Packet from a PDU* and a Timestamp. | |
Packet (const PDU &rhs) | |
Constructs a Packet from a const PDU&. | |
Packet (const RefPacket &pck) | |
Constructs a Packet from a RefPacket. | |
Packet (const PtrPacket &pck) | |
Constructs a Packet from a PtrPacket object. | |
Packet (const Packet &rhs) | |
Copy constructor. | |
Packet & | operator= (const Packet &rhs) |
Copy assignment operator. | |
Packet (Packet &&rhs) TINS_NOEXCEPT | |
Packet & | operator= (Packet &&rhs) TINS_NOEXCEPT |
~Packet () | |
Packet destructor. | |
const Timestamp & | timestamp () const |
PDU * | pdu () |
Returns the stored PDU*. | |
const PDU * | pdu () const |
Returns the stored PDU*. | |
PDU * | release_pdu () |
Releases ownership of the stored PDU*. | |
operator bool () const | |
Tests whether this is Packet contains a valid PDU. | |
Packet & | operator/= (const PDU &rhs) |
Concatenation operator. | |
|
inline |
Default constructs a Packet.
The PDU* will be set to a null pointer.
Constructs a Packet from a PDU* and a Timestamp.
The PDU is cloned using PDU::clone.
Constructs a Packet from a PDU& and a Timestamp.
The PDU is cloned using PDU::clone.
Constructs a Packet from a const PDU&.
The timestamp will be set to the current time.
This calls PDU::clone on the PDU parameter.
Constructs a Packet from a RefPacket.
This calls PDU::clone on the RefPacket's PDU.
Copy constructor.
This calls PDU::clone on the rhs's PDU* member.
|
inline |
Move constructor.
|
inline |
Packet destructor.
This calls operator delete on the stored PDU*.
|
inline |
Copy assignment operator.
This calls PDU::clone on the rhs's PDU* member.
|
inline |
|
inline |
Releases ownership of the stored PDU*.
This method returns the stored PDU* and sets the stored PDU* to a null pointer, so the destructor will be well behaved. Use this method if you want to keep the internal PDU* somewhere. Otherwise, when Packet's destructor is called, the stored pointer will be deleted.