Base module
IPacketCreationStrategy
Abstract strategy for creating typed packets from raw buffer data.
IPacketCreationStrategy
#include <icy/packetfactory.h>class IPacketCreationStrategyDefined in src/base/include/icy/packetfactory.h:29
Subclassed by:
PacketCreationStrategy< PacketT >
Abstract strategy for creating typed packets from raw buffer data.
List of all members
| Name | Kind | Owner |
|---|---|---|
IPacketCreationStrategy | function | Declared here |
~IPacketCreationStrategy | function | Declared here |
create | function | Declared here |
priority | function | Declared here |
Public Methods
| Return | Name | Description |
|---|---|---|
IPacketCreationStrategy | Defaulted constructor. | |
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.
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.
Parameters
bufferRaw input data.nreadSet to the number of bytes consumed on success, 0 otherwise.
Returns
Newly allocated packet on success, nullptr if the buffer does not match.
Reimplemented by
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).
