Home
Base module

FlagPacket

Packet for sending bitwise flags along the packet stream.

FlagPacket

#include <icy/packet.h>
class FlagPacket

Defined in src/base/include/icy/packet.h:146

Inherits: IPacket

Packet for sending bitwise flags along the packet stream.

List of all members

NameKindOwner
FlagPacketfunctionDeclared here
clonefunctionDeclared here
FlagPacketfunctionDeclared here
~FlagPacketfunctionDeclared here
readfunctionDeclared here
writefunctionDeclared here
classNamefunctionDeclared here
operator<<friendInherited from IPacket
opaquevariableInherited from IPacket
infovariableInherited from IPacket
flagsvariableInherited from IPacket
IPacketfunctionInherited from IPacket
IPacketfunctionInherited from IPacket
operator=functionInherited from IPacket
clonefunctionInherited from IPacket
~IPacketfunctionInherited from IPacket
readfunctionInherited from IPacket
writefunctionInherited from IPacket
sizefunctionInherited from IPacket
hasDatafunctionInherited from IPacket
datafunctionInherited from IPacket
constDatafunctionInherited from IPacket
classNamefunctionInherited from IPacket
printfunctionInherited from IPacket

Inherited from IPacket

KindNameDescription
friendoperator<< inlineStream insertion operator; delegates to print().
variableopaqueOptional type-safe context data. Use std::any_cast to retrieve. Lifetime of the stored value is tied to the packet's lifetime.
variableinfoOptional extra information about the packet.
variableflagsProvides basic information about the packet.
functionIPacket inline
functionIPacket inlineCopy constructor; clones the info object if present.
functionoperator= inlineCopy assignment; clones the info object if present.
functionclone virtual constReturns a heap-allocated deep copy of this packet.
function~IPacket virtualDefaulted destructor.
functionread virtualRead/parse to the packet from the given input buffer. The number of bytes read is returned.
functionwrite virtual constCopy/generate to the packet given output buffer. The number of bytes written can be obtained from the buffer.
functionsize virtual const inlineThe size of the packet in bytes.
functionhasData virtual const inlineReturns true if the packet has a non-null data pointer.
functiondata virtual const inlineThe packet data pointer for buffered packets.
functionconstData virtual const inlineThe const packet data pointer for buffered packets.
functionclassName virtual constReturns the class name of this packet type for logging and diagnostics.
functionprint virtual const inlinePrints a human-readable representation to the given stream.

Public Methods

ReturnNameDescription
FlagPacket inline
std::unique_ptr< IPacket >clone virtual const inline override
FlagPacket inline
ssize_tread virtual inline overrideNo-op read; FlagPacket carries no payload data.
voidwrite virtual const inline overrideNo-op write; FlagPacket carries no payload data.
const char *className virtual const inline overrideReturns 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

  • flags Bitwise flags to carry in this packet.

clone

virtual const inline override

virtual inline std::unique_ptr< IPacket > clone() const override

Defined 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

  • that Source packet to copy from.

read

virtual inline override

virtual inline ssize_t read(const ConstBuffer &) override

Defined 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 override

Defined 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 override

Defined in src/base/include/icy/packet.h:176

Returns the class name of this packet type for logging and diagnostics.

Reimplements