-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathFetchSink.hpp
51 lines (39 loc) · 1.11 KB
/
FetchSink.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
////////////////////////////////////////////////////////////////////////////////
//! \file FetchSink.hpp
//! \brief The FetchSink class declaration.
//! \author Chris Oldwood
// Check for previous inclusion
#ifndef APP_FETCHSINK_HPP
#define APP_FETCHSINK_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <map>
#include <NCL/DefDDEClientListener.hpp>
// Forward declarations.
class ValueFormatter;
////////////////////////////////////////////////////////////////////////////////
//! The sink used to handle updates from the DDE server when fetching values.
class FetchSink : public CDefDDEClientListener
{
public:
// Type aliases.
typedef std::map<tstring, tstring> Values;
public:
//! Constructor.
FetchSink(const ValueFormatter& formatter, Values& values);
//! Destructor.
~FetchSink();
private:
//
// Members.
//
const ValueFormatter& m_formatter; //!< The value formatter.
Values& m_values; //!< The values for advised links.
//
// IDDEClientListener Methods.
//
//! Handle a link being updated.
virtual void OnAdvise(CDDELink* link, const CDDEData* value);
};
#endif // APP_FETCHSINK_HPP