The base class data structure for Rebounds. More...

#include <HyperspaceCore/Global>

Inheritance diagram for Hyperspace::Rebound:

Public Member Functions

 Rebound (const QByteArray &waveId, ResponseCode code=ResponseCode::InvalidCode)
 Constructs a Rebound from a Wave ID. More...
 
 Rebound (const Wave &wave, ResponseCode code=ResponseCode::InvalidCode)
 Constructs a Rebound from a Wave. More...
 
QByteArray id () const
 

Public Attributes

quint16 response
 The Rebound's response code. More...
 
ByteArrayHash attributes
 The Rebound's attributes. More...
 
QByteArray payload
 The Rebound's payload, if any. More...
 

Detailed Description

The base class data structure for Rebounds.

Rebound is the base data structure which is used for representing and serializing waves. It encloses every Rebound field, and is easily serializable and deserializable through Data Streams.

A rebound can only be constructed from an incoming Wave or Wave ID.

See also
Hyperspace::Wave

Constructor & Destructor Documentation

Hyperspace::Rebound::Rebound ( const QByteArray &  waveId,
ResponseCode  code = ResponseCode::InvalidCode 
)

Constructs a Rebound from a Wave ID.

waveId The ID of the Wave associated to this Rebound. code The response code of this Rebound.

Hyperspace::Rebound::Rebound ( const Wave wave,
ResponseCode  code = ResponseCode::InvalidCode 
)

Constructs a Rebound from a Wave.

waveId The Wave associated to this Rebound. code The response code of this Rebound.

Member Function Documentation

QByteArray Hyperspace::Rebound::id ( ) const
inline
Returns
The Rebound's id. It corresponds to its associated Wave's ID.

Member Data Documentation

quint16 Hyperspace::Rebound::response

The Rebound's response code.

ByteArrayHash Hyperspace::Rebound::attributes

The Rebound's attributes.

QByteArray Hyperspace::Rebound::payload

The Rebound's payload, if any.