DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
DiscordCoreAPI::UnboundedMessageBlock< OTy > Class Template Reference

A thread-safe messaging block for data-structures. More...

#include <Utilities.hpp>

Public Member Functions

void clearContents ()
 Clears the contents of the messaging block.
 
void send (const OTy &object)
 Sends an object of type OTy to the "recipient".
 
void send (OTy &&object)
 Sends an object of type OTy to the "recipient".
 
void send (OTy &object)
 Sends an object of type OTy to the "recipient".
 
void sendFront (OTy &&object)
 Sends an object of type OTy to the "recipient", ahead of other already queued items.
 
void sendFront (OTy &object)
 Sends an object of type OTy to the "recipient", ahead of other already queued items.
 
bool tryReceive (OTy &object)
 Tries to receive an object of type OTy to be placed into a reference.
 

Member Function Documentation

◆ send() [1/3]

template<CopyableOrMovable OTy>
void DiscordCoreAPI::UnboundedMessageBlock< OTy >::send ( const OTy &  object)
inline
Parameters
objectAn object of OTy.

Definition at line 1240 of file Utilities.hpp.

◆ send() [2/3]

template<CopyableOrMovable OTy>
void DiscordCoreAPI::UnboundedMessageBlock< OTy >::send ( OTy &&  object)
inline
Parameters
objectAn object of OTy.

Definition at line 1226 of file Utilities.hpp.

◆ send() [3/3]

template<CopyableOrMovable OTy>
void DiscordCoreAPI::UnboundedMessageBlock< OTy >::send ( OTy &  object)
inline
Parameters
objectAn object of OTy.

Definition at line 1233 of file Utilities.hpp.

◆ sendFront() [1/2]

template<CopyableOrMovable OTy>
void DiscordCoreAPI::UnboundedMessageBlock< OTy >::sendFront ( OTy &&  object)
inline
Parameters
objectAn object of OTy.

Definition at line 1212 of file Utilities.hpp.

◆ sendFront() [2/2]

template<CopyableOrMovable OTy>
void DiscordCoreAPI::UnboundedMessageBlock< OTy >::sendFront ( OTy &  object)
inline
Parameters
objectAn object of OTy.

Definition at line 1219 of file Utilities.hpp.

◆ tryReceive()

template<CopyableOrMovable OTy>
bool DiscordCoreAPI::UnboundedMessageBlock< OTy >::tryReceive ( OTy &  object)
inline
Parameters
objectA reference of type OTy for placing the potentially received object.
Returns
bool A bool, denoting whether or not we received an object.

Definition at line 1254 of file Utilities.hpp.

Here is the caller graph for this function:

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