Stellarium 0.15.2
List of all members | Protected Member Functions
TypedSyncServerEventSender< T > Class Template Referenceabstract

This class provides a semi-automatic event sender using a specific message type. More...

#include <SyncServerEventSenders.hpp>

+ Inheritance diagram for TypedSyncServerEventSender< T >:
+ Collaboration diagram for TypedSyncServerEventSender< T >:

Protected Member Functions

virtual T constructMessage ()=0
 This has to be used to construct a message using current app state. More...
 
virtual void newClientConnected (SyncRemotePeer &client) Q_DECL_OVERRIDE
 Uses constructMessage() to send a message to the new client. More...
 
virtual void update () Q_DECL_OVERRIDE
 If isDirty is true, broadcasts a message to all using constructMessage() and broadcastMessage, and resets isDirty. More...
 
- Protected Member Functions inherited from SyncServerEventSender
void broadcastMessage (const SyncMessage &msg)
 Subclasses can call this to broadcast a message to all valid connected clients. More...
 

Additional Inherited Members

- Protected Slots inherited from SyncServerEventSender
virtual void reactToStellariumEvent ()
 This may be used to react to Stellarium application events and queue a broadcast or store the changed state. More...
 
- Protected Attributes inherited from SyncServerEventSender
bool isDirty
 Free to use by sublasses. Recommendation: use to track if update() should broadcast a message. More...
 
StelCorecore
 Direct access to StelCore. More...
 

Detailed Description

template<class T>
class TypedSyncServerEventSender< T >

This class provides a semi-automatic event sender using a specific message type.

Definition at line 69 of file SyncServerEventSenders.hpp.

Member Function Documentation

template<class T>
virtual T TypedSyncServerEventSender< T >::constructMessage ( )
protectedpure virtual

This has to be used to construct a message using current app state.

The default implementation constructs an error message.

Implemented in SelectionEventSender, LocationEventSender, and TimeEventSender.

template<class T >
void TypedSyncServerEventSender< T >::newClientConnected ( SyncRemotePeer client)
protectedvirtual

Uses constructMessage() to send a message to the new client.

Reimplemented from SyncServerEventSender.

Definition at line 85 of file SyncServerEventSenders.hpp.

template<class T >
void TypedSyncServerEventSender< T >::update ( )
protectedvirtual

If isDirty is true, broadcasts a message to all using constructMessage() and broadcastMessage, and resets isDirty.

Reimplemented from SyncServerEventSender.

Definition at line 91 of file SyncServerEventSenders.hpp.


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