Base module
IPacketCreationStrategy
Abstract strategy for creating typed packets from raw buffer data.
#include <icy/packetfactory.h>
class IPacketCreationStrategyDefined in src/base/include/icy/packetfactory.h:29
- Subclassed by
PacketCreationStrategy< PacketT >
Public Methods
| Return | Name | Description |
|---|---|---|
IPacketCreationStrategy | Defaulted constructor. | |
~IPacketCreationStrategy virtual | Defaulted destructor. | |
IPacket * | create virtual const | Attempts to create a typed packet from the given buffer. |
int | priority virtual const | Returns the dispatch priority of this strategy (0–100; higher runs first). |
IPacketCreationStrategy
IPacketCreationStrategy() = defaultDefined in src/base/include/icy/packetfactory.h:32
Defaulted constructor.
~IPacketCreationStrategy
virtual
virtual ~IPacketCreationStrategy() = defaultDefined in src/base/include/icy/packetfactory.h:33
Defaulted destructor.
create
virtual const
virtual IPacket * create(const ConstBuffer & buffer, size_t & nread) constDefined in src/base/include/icy/packetfactory.h:38
Attempts to create a typed packet from the given buffer.
Returns
Newly allocated packet on success, nullptr if the buffer does not match.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
buffer | const ConstBuffer & | Raw input data. |
nread | size_t & | Set to the number of bytes consumed on success, 0 otherwise. |
priority
virtual const
virtual int priority() constDefined in src/base/include/icy/packetfactory.h:41
Returns the dispatch priority of this strategy (0–100; higher runs first).
