TrinityCore
QueryCallback Class Reference

#include <QueryCallback.h>

Classes

struct  QueryCallbackData
 

Public Member Functions

 QueryCallback (QueryResultFuture &&result)
 
 QueryCallback (PreparedQueryResultFuture &&result)
 
 QueryCallback (QueryCallback &&right) noexcept
 
QueryCallbackoperator= (QueryCallback &&right) noexcept
 
 ~QueryCallback ()
 
QueryCallback && WithCallback (std::function< void(QueryResult)> &&callback)
 
QueryCallback && WithPreparedCallback (std::function< void(PreparedQueryResult)> &&callback)
 
QueryCallback && WithChainingCallback (std::function< void(QueryCallback &, QueryResult)> &&callback)
 
QueryCallback && WithChainingPreparedCallback (std::function< void(QueryCallback &, PreparedQueryResult)> &&callback)
 
void SetNextQuery (QueryCallback &&next)
 
bool InvokeIfReady ()
 

Private Member Functions

 QueryCallback (QueryCallback const &right)=delete
 
QueryCallbackoperator= (QueryCallback const &right)=delete
 

Private Attributes

union {
   QueryResultFuture   _string
 
   PreparedQueryResultFuture   _prepared
 
}; 
 
bool _isPrepared
 
std::queue< QueryCallbackData, std::list< QueryCallbackData > > _callbacks
 

Friends

template<typename T >
void ConstructActiveMember (T *obj)
 
template<typename T >
void DestroyActiveMember (T *obj)
 
template<typename T >
void MoveFrom (T *to, T &&from)
 

Detailed Description

Definition at line 27 of file QueryCallback.h.

Constructor & Destructor Documentation

◆ QueryCallback() [1/4]

QueryCallback::QueryCallback ( QueryResultFuture &&  result)
explicit

◆ QueryCallback() [2/4]

QueryCallback::QueryCallback ( PreparedQueryResultFuture &&  result)
explicit

◆ QueryCallback() [3/4]

QueryCallback::QueryCallback ( QueryCallback &&  right)
noexcept

Definition at line 120 of file QueryCallback.cpp.

+ Here is the call graph for this function:

◆ ~QueryCallback()

QueryCallback::~QueryCallback ( )

Definition at line 144 of file QueryCallback.cpp.

◆ QueryCallback() [4/4]

QueryCallback::QueryCallback ( QueryCallback const &  right)
privatedelete

Member Function Documentation

◆ InvokeIfReady()

bool QueryCallback::InvokeIfReady ( )

Definition at line 178 of file QueryCallback.cpp.

◆ operator=() [1/2]

QueryCallback & QueryCallback::operator= ( QueryCallback &&  right)
noexcept

Definition at line 128 of file QueryCallback.cpp.

+ Here is the call graph for this function:

◆ operator=() [2/2]

QueryCallback & QueryCallback::operator= ( QueryCallback const &  right)
privatedelete

◆ SetNextQuery()

void QueryCallback::SetNextQuery ( QueryCallback &&  next)

Definition at line 173 of file QueryCallback.cpp.

+ Here is the caller graph for this function:

◆ WithCallback()

QueryCallback && QueryCallback::WithCallback ( std::function< void(QueryResult)> &&  callback)

Definition at line 149 of file QueryCallback.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WithChainingCallback()

QueryCallback && QueryCallback::WithChainingCallback ( std::function< void(QueryCallback &, QueryResult)> &&  callback)

Definition at line 159 of file QueryCallback.cpp.

+ Here is the caller graph for this function:

◆ WithChainingPreparedCallback()

QueryCallback && QueryCallback::WithChainingPreparedCallback ( std::function< void(QueryCallback &, PreparedQueryResult)> &&  callback)

Definition at line 166 of file QueryCallback.cpp.

+ Here is the caller graph for this function:

◆ WithPreparedCallback()

QueryCallback && QueryCallback::WithPreparedCallback ( std::function< void(PreparedQueryResult)> &&  callback)

Definition at line 154 of file QueryCallback.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ConstructActiveMember

template<typename T >
void ConstructActiveMember ( T *  obj)
friend

Definition at line 34 of file QueryCallback.cpp.

◆ DestroyActiveMember

template<typename T >
void DestroyActiveMember ( T *  obj)
friend

Definition at line 43 of file QueryCallback.cpp.

◆ MoveFrom

template<typename T >
void MoveFrom ( T *  to,
T &&  from 
)
friend

Definition at line 52 of file QueryCallback.cpp.

Member Data Documentation

◆ 

union { ... } QueryCallback::@8

◆ _callbacks

std::queue<QueryCallbackData, std::list<QueryCallbackData> > QueryCallback::_callbacks
private

Definition at line 64 of file QueryCallback.h.

◆ _isPrepared

bool QueryCallback::_isPrepared
private

Definition at line 61 of file QueryCallback.h.

◆ _prepared

PreparedQueryResultFuture QueryCallback::_prepared

Definition at line 59 of file QueryCallback.h.

◆ _string

QueryResultFuture QueryCallback::_string

Definition at line 58 of file QueryCallback.h.


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