blob: 123fed50154eda0fa9287d49ea5881263132bc21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "stdafx.h"
CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(MCONTACT hContact, wchar_t chr)
: m_hContact(hContact), m_chr(chr), m_bValid(false), m_dResult(0.0)
{
}
void CQuotesProviderVisitorTendency::Visit(const CQuotesProviderBase&)
{
switch (m_chr) {
case 'r':
case 'R':
GetValue(DB_STR_QUOTE_CURR_VALUE);
break;
case 'p':
GetValue(DB_STR_QUOTE_PREV_VALUE);
break;
}
}
void CQuotesProviderVisitorTendency::GetValue(LPCSTR pszDbKeyName)
{
m_bValid = Quotes_DBReadDouble(m_hContact, QUOTES_MODULE_NAME, pszDbKeyName, m_dResult);
}
|