Hyperspace::KeyValueRebound Class Reference

Helper class for Key/Value rebounds. More...

#include <HyperspaceCore/Global>

Inheritance diagram for Hyperspace::KeyValueRebound:

Public Member Functions

 KeyValueRebound (const QByteArray &waveId, ResponseCode code=ResponseCode::InvalidCode)
 Constructs a Key/Value Rebound from a Wave ID. More...
 
- Public Member Functions inherited from Hyperspace::Rebound
 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

QVariantMap data
 The Rebound's return payload, as a VariantMap. More...
 
- Public Attributes inherited from Hyperspace::Rebound
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

Helper class for Key/Value rebounds.

KeyValueRebound is a convenience class used to easily construct Rebounds which carry a Key/Value payload in response. Key/Value deserialization is performed either according to the Gate's settings or to the Wave's original request. Instead of setting Rebound's original parameters, only the response code and the "data" parameter should be set, which will populate attributes and payload accordingly.

Note
A rebound can only be constructed from an incoming Wave or Wave ID.
See also
Hyperspace::Rebound

Constructor & Destructor Documentation

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

Constructs a Key/Value Rebound from a Wave ID.

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

Member Data Documentation

QVariantMap Hyperspace::KeyValueRebound::data

The Rebound's return payload, as a VariantMap.