Base module
FlagPacket
Packet for sending bitwise flags along the packet stream.
FlagPacket
#include <icy/packet.h>class FlagPacketDefined in src/base/include/icy/packet.h:146
Inherits:
IPacket
Packet for sending bitwise flags along the packet stream.
List of all members
| Name | Kind | Owner |
|---|---|---|
FlagPacket | function | Declared here |
clone | function | Declared here |
FlagPacket | function | Declared here |
~FlagPacket | function | Declared here |
read | function | Declared here |
write | function | Declared here |
className | function | Declared here |
operator<< | friend | Inherited from IPacket |
opaque | variable | Inherited from IPacket |
info | variable | Inherited from IPacket |
flags | variable | Inherited from IPacket |
IPacket | function | Inherited from IPacket |
IPacket | function | Inherited from IPacket |
operator= | function | Inherited from IPacket |
clone | function | Inherited from IPacket |
~IPacket | function | Inherited from IPacket |
read | function | Inherited from IPacket |
write | function | Inherited from IPacket |
size | function | Inherited from IPacket |
hasData | function | Inherited from IPacket |
data | function | Inherited from IPacket |
constData | function | Inherited from IPacket |
className | function | Inherited from IPacket |
print | function | Inherited from IPacket |
Inherited from IPacket
| Kind | Name | Description |
|---|---|---|
friend | operator<< inline | Stream insertion operator; delegates to print(). |
variable | opaque | Optional type-safe context data. Use std::any_cast to retrieve. Lifetime of the stored value is tied to the packet's lifetime. |
variable | info | Optional extra information about the packet. |
variable | flags | Provides basic information about the packet. |
function | IPacket inline | |
function | IPacket inline | Copy constructor; clones the info object if present. |
function | operator= inline | Copy assignment; clones the info object if present. |
function | clone virtual const | Returns a heap-allocated deep copy of this packet. |
function | ~IPacket virtual | Defaulted destructor. |
function | read virtual | Read/parse to the packet from the given input buffer. The number of bytes read is returned. |
function | write virtual const | Copy/generate to the packet given output buffer. The number of bytes written can be obtained from the buffer. |
function | size virtual const inline | The size of the packet in bytes. |
function | hasData virtual const inline | Returns true if the packet has a non-null data pointer. |
function | data virtual const inline | The packet data pointer for buffered packets. |
function | constData virtual const inline | The const packet data pointer for buffered packets. |
function | className virtual const | Returns the class name of this packet type for logging and diagnostics. |
function | print virtual const inline | Prints a human-readable representation to the given stream. |
Public Methods
| Return | Name | Description |
|---|---|---|
FlagPacket inline | ||
std::unique_ptr< IPacket > | clone virtual const inline override | |
FlagPacket inline | ||
ssize_t | read virtual inline override | No-op read; FlagPacket carries no payload data. |
void | write virtual const inline override | No-op write; FlagPacket carries no payload data. |
const char * | className virtual const inline override | Returns the class name of this packet type for logging and diagnostics. |
FlagPacket
inline
inline FlagPacket(unsigned flags = 0)Defined in src/base/include/icy/packet.h:150
Parameters
flagsBitwise flags to carry in this packet.
clone
virtual const inline override
virtual inline std::unique_ptr< IPacket > clone() const overrideDefined in src/base/include/icy/packet.h:156
Returns
Owning pointer to a deep copy of this packet.
Reimplements
FlagPacket
inline
inline FlagPacket(const FlagPacket & that)Defined in src/base/include/icy/packet.h:162
Parameters
thatSource packet to copy from.
read
virtual inline override
virtual inline ssize_t read(const ConstBuffer &) overrideDefined in src/base/include/icy/packet.h:171
No-op read; FlagPacket carries no payload data.
Returns
Always returns true (1).
Reimplements
write
virtual const inline override
virtual inline void write(Buffer &) const overrideDefined in src/base/include/icy/packet.h:174
No-op write; FlagPacket carries no payload data.
Reimplements
className
virtual const inline override
virtual inline const char * className() const overrideDefined in src/base/include/icy/packet.h:176
Returns the class name of this packet type for logging and diagnostics.
