Server
 All Data Structures Files Functions Variables
Public Member Functions
communication::AnimationQueue Class Reference

#include <AnimationQueue.h>

Public Member Functions

 AnimationQueue (Communicator &communicator)
 
 AnimationQueue (const AnimationQueue &animationQueue)=delete
 
AnimationQueueoperator= (const AnimationQueue &animationQueue)=delete
 
 AnimationQueue (AnimationQueue &&animationQueue)=delete
 
AnimationQueueoperator= (AnimationQueue &&AnimationQueue)=delete
 
void add (const messages::Payload &payload, const std::vector< int > &clients, std::chrono::milliseconds timeOffset=std::chrono::milliseconds{0})
 
 ~AnimationQueue ()
 

Detailed Description

The AnimationQueue is responsible for delaying messages to preserve the animation duration while also keeping the order of the message

Constructor & Destructor Documentation

communication::AnimationQueue::AnimationQueue ( Communicator communicator)
explicit

CTor: Construct the AnimationQueue with a communicator to which to send

Parameters
communicatorreference to the communicator to which to send
communication::AnimationQueue::AnimationQueue ( const AnimationQueue animationQueue)
delete

Explicitly delete the copy C-Tor to obey the rule of five

communication::AnimationQueue::AnimationQueue ( AnimationQueue &&  animationQueue)
delete

Explicitly delete the move C-Tor to obey the rule of five

communication::AnimationQueue::~AnimationQueue ( )

DTor: Stops the thread

Member Function Documentation

void communication::AnimationQueue::add ( const messages::Payload &  payload,
const std::vector< int > &  clients,
std::chrono::milliseconds  timeOffset = std::chrono::milliseconds{0} 
)

Add an payload to the queue to send

Parameters
payloadthe payload to send
clientslist off all clients to which to send the message
timeOffsetthe time between: the current time if the queue is empty, at the end of the queue if the queue is non empty but all offsets are obeyed or some time after the queue to obey the offset (even if the queue is empty it is checked with the last sent message)
AnimationQueue& communication::AnimationQueue::operator= ( const AnimationQueue animationQueue)
delete

Explicitly delete the copy assignment to obey the rule of five

AnimationQueue& communication::AnimationQueue::operator= ( AnimationQueue &&  AnimationQueue)
delete

Explicitly delete the move assignment to obey the rule of five


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