CatapultServer  v0.5.0.1 (Elephant)
catapult::ionet::PacketPayload Class Reference

A packet payload that can be written. More...

Collaboration diagram for catapult::ionet::PacketPayload:

Public Member Functions

 PacketPayload ()
 Creates a default (empty) packet payload. More...
 
 PacketPayload (PacketType type)
 Creates a data-less packet payload with the specified type. More...
 
 PacketPayload (const std::shared_ptr< const Packet > &pPacket)
 Creates a packet payload around a single shared packet (pPacket). More...
 
bool unset () const
 Returns true if this packet payload is unset. More...
 
const PacketHeaderheader () const
 Packet header. More...
 
const std::vector< RawBuffer > & buffers () const
 Packet data. More...
 

Static Public Member Functions

static PacketPayload Merge (const std::shared_ptr< const Packet > &pPacket, const PacketPayload &payload)
 Merges a packet (pPacket) and a packet payload into a new packet payload. More...
 

Private Attributes

PacketHeader m_header
 
std::vector< RawBuffer > m_buffers
 
std::vector< std::shared_ptr< const void > > m_entities
 

Friends

class PacketPayloadBuilder
 

Detailed Description

A packet payload that can be written.

Constructor & Destructor Documentation

◆ PacketPayload() [1/3]

catapult::ionet::PacketPayload::PacketPayload ( )

Creates a default (empty) packet payload.

◆ PacketPayload() [2/3]

catapult::ionet::PacketPayload::PacketPayload ( PacketType  type)
explicit

Creates a data-less packet payload with the specified type.

◆ PacketPayload() [3/3]

catapult::ionet::PacketPayload::PacketPayload ( const std::shared_ptr< const Packet > &  pPacket)
explicit

Creates a packet payload around a single shared packet (pPacket).

Member Function Documentation

◆ buffers()

const std::vector< RawBuffer > & catapult::ionet::PacketPayload::buffers ( ) const

Packet data.

◆ header()

const PacketHeader & catapult::ionet::PacketPayload::header ( ) const

Packet header.

◆ Merge()

PacketPayload catapult::ionet::PacketPayload::Merge ( const std::shared_ptr< const Packet > &  pPacket,
const PacketPayload payload 
)
static

Merges a packet (pPacket) and a packet payload into a new packet payload.

Here is the call graph for this function:

◆ unset()

bool catapult::ionet::PacketPayload::unset ( ) const

Returns true if this packet payload is unset.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ PacketPayloadBuilder

friend class PacketPayloadBuilder
friend

Member Data Documentation

◆ m_buffers

std::vector<RawBuffer> catapult::ionet::PacketPayload::m_buffers
private

◆ m_entities

std::vector<std::shared_ptr<const void> > catapult::ionet::PacketPayload::m_entities
private

◆ m_header

PacketHeader catapult::ionet::PacketPayload::m_header
private

The documentation for this class was generated from the following files: