All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MessageQueue.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IMessageQueue.h"
6 #include "MPMCQueue.h"
7 #include "Types.h"
8 
9 namespace Eegeo
10 {
11  namespace Messaging
12  {
13  template <typename T>
14  class MessageQueue : protected Eegeo::NonCopyable, public IMessageQueue<T>
15  {
16  public:
17  void Enqueue(T const message) { m_queue.Enqueue(message); }
18  void EnqueueHead(T const message) { m_queue.EnqueueHead(message); }
19  T Dequeue() { return m_queue.Dequeue(); }
20  bool TryDequeue(T& out_message) { return m_queue.TryDequeue(out_message); }
21 
22  private:
24  };
25  }
26 }