Free Electron
MessageSignaler.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __network_MessageSignaler_h__
8 #define __network_MessageSignaler_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Convert signals to network messages
17 
18  As a StateCatalog::ListenerI this class is intended to be handed to
19  a StateCatalog with its addListener method.
20 
21  As a SignalerI, any HandlerI objects inserted to this signaler will
22  receive relevant signal as they appear on the select key
23  on the StateCatalog.
24  This object removes each message from the StateCatalog's deque
25  as it create and sends the resulting signal.
26 
27  @ingroup network
28 *//***************************************************************************/
29 class FE_DL_EXPORT MessageSignaler:
30  virtual public StateCatalog::ListenerI,
31  public ChainSignaler,
32  public Initialize<MessageSignaler>
33 {
34  public:
35  MessageSignaler(void) {}
36 
37  void initialize(void);
38 
39  //* as StateCatalog::ListenerI
40 virtual void bind(sp<StateCatalog> a_spStateCatalog,String a_name)
41  { m_spStateCatalog=a_spStateCatalog; }
42 virtual void notify(String a_name,String a_property);
43 
44  private:
45  sp<StateCatalog> m_spStateCatalog;
46  sp<BaseType> m_spRecordType;
47 };
48 
49 } /* namespace ext */
50 } /* namespace fe */
51 
52 #endif /* __network_MessageSignaler_h__ */
53 
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Convert signals to network messages.
Definition: MessageSignaler.h:29
Automatically reference-counted string container.
Definition: String.h:128
SignalerI that calls registered HandlerI instances in order.
Definition: ChainSignaler.h:29