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 (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/4]

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

Definition at line 1960 of file Utilities.hpp.

◆ send() [2/4]

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

Definition at line 1967 of file Utilities.hpp.

◆ send() [3/4]

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

Definition at line 1946 of file Utilities.hpp.

◆ send() [4/4]

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

Definition at line 1953 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 1932 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 1939 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 1982 of file Utilities.hpp.


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