-
Notifications
You must be signed in to change notification settings - Fork 8
/
AdviseSink.hpp
52 lines (40 loc) · 1.24 KB
/
AdviseSink.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
////////////////////////////////////////////////////////////////////////////////
//! \file AdviseSink.hpp
//! \brief The AdviseSink class declaration.
//! \author Chris Oldwood
// Check for previous inclusion
#ifndef APP_ADVISESINK_HPP
#define APP_ADVISESINK_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <Core/tiosfwd.hpp>
#include <NCL/DefDDEClientListener.hpp>
#include <WCL/Event.hpp>
// Forward declarations.
class ValueFormatter;
////////////////////////////////////////////////////////////////////////////////
//! The sink used to handle updates from the DDE server when just advising.
class AdviseSink : public CDefDDEClientListener
{
public:
//! Constructor.
AdviseSink(tostream& out, const ValueFormatter& formatter, CEvent& abortEvent);
//! Destructor.
~AdviseSink();
private:
//
// Members.
//
tostream& m_out; //!< The output stream.
const ValueFormatter& m_formatter; //!< The value formatter.
CEvent& m_abortEvent; //!< Event used to signal termination.
//
// IDDEClientListener Methods.
//
//! Handle a link being updated.
virtual void OnAdvise(CDDELink* link, const CDDEData* value);
//! Handle the conversation closing.
virtual void OnDisconnect(CDDECltConv* conv);
};
#endif // APP_ADVISESINK_HPP