Default constructs a Packet.
The PDU* will be set to a null pointer.
Tins::Packet::Packet |
( |
const PDU * |
apdu, |
|
|
const Timestamp & |
tstamp |
|
) |
| |
|
inline |
Tins::Packet::Packet |
( |
const PDU & |
apdu, |
|
|
const Timestamp & |
tstamp |
|
) |
| |
|
inline |
Constructs a Packet from a PDU* and a Timestamp.
The PDU* will be owned by the Packet. This means you do not have to explicitly delete the pointer, that will be done automatically by the Packet when it goes out of scope.
Tins::Packet::Packet |
( |
const PDU & |
rhs | ) |
|
|
inline |
Constructs a Packet from a const PDU&.
The timestamp will be set to the current time.
This calls PDU::clone on the PDU parameter.
Tins::Packet::Packet |
( |
const RefPacket & |
pck | ) |
|
|
inline |
Tins::Packet::Packet |
( |
const Packet & |
rhs | ) |
|
|
inline |
Copy constructor.
This calls PDU::clone on the rhs's PDU* member.
Tins::Packet::Packet |
( |
Packet && |
rhs | ) |
|
|
inline |
Tins::Packet::~Packet |
( |
| ) |
|
|
inline |
Packet destructor.
This calls operator delete on the stored PDU*.
Tins::Packet::operator bool |
( |
| ) |
const |
|
inline |
Tests whether this is Packet contains a valid PDU.
- Returns
- true if pdu() == nullptr, false otherwise.
Packet& Tins::Packet::operator/= |
( |
const PDU & |
rhs | ) |
|
|
inline |
Concatenation operator.
Adds the PDU at the end of the PDU stack.
- Parameters
-
rhs | The PDU to be appended. |
Copy assignment operator.
This calls PDU::clone on the rhs's PDU* member.
Move assignment operator.
PDU* Tins::Packet::pdu |
( |
| ) |
|
|
inline |
const PDU* Tins::Packet::pdu |
( |
| ) |
const |
|
inline |
PDU* Tins::Packet::release_pdu |
( |
| ) |
|
|
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.
const Timestamp& Tins::Packet::timestamp |
( |
| ) |
const |
|
inline |
Returns this Packet's timestamp.
The documentation for this class was generated from the following file:
- /home/matias/Projects/libtins/code/include/tins/packet.h