ZG  "1.00
 All Classes Namespaces Files Functions Variables Enumerator Friends Macros Pages
ChoirThread.h
Go to the documentation of this file.
1 #ifndef ChoirThread_h
2 #define ChoirThread_h
3 
4 #include "qtsupport/QMessageTransceiverThread.h"
5 #include "ChoirNameSpace.h"
6 #include "ChoirSession.h"
7 
8 namespace choir {
9 
11 class ChoirThread : public QMessageTransceiverThread
12 {
13 public:
17  ChoirThread(const ZGPeerSettings & peerSettings);
18 
20  const INetworkTimeProvider * GetNetworkTimeProvider() const {return _choirSession();}
21 
23  const ZGPeerSettings & GetLocalPeerSettings() const;
24 
26  const ZGPeerID & GetLocalPeerID() const;
27 
28 protected:
30  virtual ReflectServerRef CreateReflectServer();
31 
32 private:
33  ChoirSessionRef _choirSession;
34 };
35 
36 }; // end namespace choir
37 
38 #endif
This immutable class holds various read-only settings that will be used to define the peer's behavior...
This is an abstract interface for an object that can provide us with network-clock-time values...
const ZGPeerSettings & GetLocalPeerSettings() const
Returns a reference to our ZGPeerSettings object (as was passed to our constructor) ...
This class contains the MUSCLE network I/O thread that has our ChoirSession inside it...
Definition: ChoirThread.h:11
A ZGPeerID is a 128-bit integer that uniquely represents a particular peer in a ZG system...
Definition: ZGPeerID.h:18
The choir namespace contains the code specific to the ZGChoir demonstration application.
Definition: ChoirNameSpace.h:7
const INetworkTimeProvider * GetNetworkTimeProvider() const
Returns a pointer to our INetworkTimeProvider object.
Definition: ChoirThread.h:20
virtual ReflectServerRef CreateReflectServer()
Overridden to add a ChoirSession object to our thread's internal ReflectServer.
ChoirThread(const ZGPeerSettings &peerSettings)
Constructor.
const ZGPeerID & GetLocalPeerID() const
Returns the local peer's ZGPeerID.