Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
QueryCallback_2< Result, ParamType1, ParamType2, chain > Class Template Reference

#include <Callback.h>

Collaboration diagram for QueryCallback_2< Result, ParamType1, ParamType2, chain >:

Public Member Functions

void FreeResult ()
ParamType1 GetFirstParam ()
Skyfire::Future< Result > GetFutureResult ()
void GetResult (Result &res)
ParamType2 GetSecondParam ()
uint8 GetStage ()
 Returns the callback stage (or CALLBACK_STAGE_INVALID if invalid).
int IsReady ()
void NextStage ()
 Advances the callback chain to the next stage, so upper level code can act on its results accordingly.
 QueryCallback_2 ()
void Reset ()
 Resets all underlying variables (param, result and stage).
void ResetStage ()
 Resets the stage of the callback chain.
void SetFirstParam (ParamType1 value)
void SetFutureResult (Skyfire::Future< Result > value)
 The parameter of this function should be a resultset returned from either .AsyncQuery or .AsyncPQuery.
void SetSecondParam (ParamType2 value)

Private Member Functions

QueryCallback_2operator= (QueryCallback_2 const &right)=delete
 QueryCallback_2 (QueryCallback_2 const &right)=delete

Private Attributes

ParamType1 _param_1
ParamType2 _param_2
Skyfire::Future< Result > _result
uint8 _stage

Detailed Description

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
class QueryCallback_2< Result, ParamType1, ParamType2, chain >

Definition at line 104 of file Callback.h.

Constructor & Destructor Documentation

◆ QueryCallback_2() [1/2]

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
QueryCallback_2< Result, ParamType1, ParamType2, chain >::QueryCallback_2 ( )
inline

Definition at line 107 of file Callback.h.

References _stage, and CALLBACK_STAGE_INVALID.

Referenced by operator=(), and QueryCallback_2().

◆ QueryCallback_2() [2/2]

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
QueryCallback_2< Result, ParamType1, ParamType2, chain >::QueryCallback_2 ( QueryCallback_2< Result, ParamType1, ParamType2, chain > const & right)
privatedelete

References QueryCallback_2().

Member Function Documentation

◆ FreeResult()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::FreeResult ( )
inline

Definition at line 130 of file Callback.h.

References _result.

Referenced by Reset().

◆ GetFirstParam()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
ParamType1 QueryCallback_2< Result, ParamType1, ParamType2, chain >::GetFirstParam ( )
inline

Definition at line 145 of file Callback.h.

References _param_1.

◆ GetFutureResult()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
Skyfire::Future< Result > QueryCallback_2< Result, ParamType1, ParamType2, chain >::GetFutureResult ( )
inline

Definition at line 115 of file Callback.h.

References _result.

◆ GetResult()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::GetResult ( Result & res)
inline

Definition at line 125 of file Callback.h.

References _result.

◆ GetSecondParam()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
ParamType2 QueryCallback_2< Result, ParamType1, ParamType2, chain >::GetSecondParam ( )
inline

Definition at line 150 of file Callback.h.

References _param_2.

◆ GetStage()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
uint8 QueryCallback_2< Result, ParamType1, ParamType2, chain >::GetStage ( )
inline

Returns the callback stage (or CALLBACK_STAGE_INVALID if invalid).

Definition at line 174 of file Callback.h.

References _stage.

◆ IsReady()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
int QueryCallback_2< Result, ParamType1, ParamType2, chain >::IsReady ( )
inline

Definition at line 120 of file Callback.h.

References _result.

◆ NextStage()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::NextStage ( )
inline

Advances the callback chain to the next stage, so upper level code can act on its results accordingly.

Definition at line 165 of file Callback.h.

References _stage.

◆ operator=()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
QueryCallback_2 & QueryCallback_2< Result, ParamType1, ParamType2, chain >::operator= ( QueryCallback_2< Result, ParamType1, ParamType2, chain > const & right)
privatedelete

References QueryCallback_2().

◆ Reset()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::Reset ( )
inline

Resets all underlying variables (param, result and stage).

Definition at line 180 of file Callback.h.

References FreeResult(), ResetStage(), SetFirstParam(), and SetSecondParam().

◆ ResetStage()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::ResetStage ( )
inline

Resets the stage of the callback chain.

Definition at line 156 of file Callback.h.

References _stage.

Referenced by Reset().

◆ SetFirstParam()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::SetFirstParam ( ParamType1 value)
inline

Definition at line 135 of file Callback.h.

References _param_1.

Referenced by Reset().

◆ SetFutureResult()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::SetFutureResult ( Skyfire::Future< Result > value)
inline

The parameter of this function should be a resultset returned from either .AsyncQuery or .AsyncPQuery.

Definition at line 110 of file Callback.h.

References _result.

◆ SetSecondParam()

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
void QueryCallback_2< Result, ParamType1, ParamType2, chain >::SetSecondParam ( ParamType2 value)
inline

Definition at line 140 of file Callback.h.

References _param_2.

Referenced by Reset().

Member Data Documentation

◆ _param_1

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
ParamType1 QueryCallback_2< Result, ParamType1, ParamType2, chain >::_param_1
private

Definition at line 190 of file Callback.h.

Referenced by GetFirstParam(), and SetFirstParam().

◆ _param_2

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
ParamType2 QueryCallback_2< Result, ParamType1, ParamType2, chain >::_param_2
private

Definition at line 191 of file Callback.h.

Referenced by GetSecondParam(), and SetSecondParam().

◆ _result

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
Skyfire::Future<Result> QueryCallback_2< Result, ParamType1, ParamType2, chain >::_result
private

Definition at line 189 of file Callback.h.

Referenced by FreeResult(), GetFutureResult(), GetResult(), IsReady(), and SetFutureResult().

◆ _stage

template<typename Result, typename ParamType1, typename ParamType2, bool chain = false>
uint8 QueryCallback_2< Result, ParamType1, ParamType2, chain >::_stage
private

Definition at line 192 of file Callback.h.

Referenced by GetStage(), NextStage(), QueryCallback_2(), and ResetStage().


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