-
Notifications
You must be signed in to change notification settings - Fork 0
/
MarketIndexDataContainer.h
37 lines (27 loc) · 1.58 KB
/
MarketIndexDataContainer.h
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
#pragma once
#ifndef MARKETINDEXDATACONTAINER_H_
#define MARKETINDEXDATACONTAINER_H_
#include "Constant.h"
typedef std::map< int, double > Map_Minute_Index;
typedef std::map< int, double >::iterator It_Minute_Index;
typedef std::map< int, std::map< int, double > > Map_Hour_Min_Index;
typedef std::map< int, std::map< int, double > >::iterator It_Hour_Min_Index;
typedef std::map< std::string, std::map< int, std::map< int, double > > > Map_SectorName_Hour_Min_Index;
typedef std::map< std::string, std::map< int, std::map< int, double > > >::iterator It_SectorName_Hour_Min_Index;
//MarketID //Index Name //Hour //Minute //Index Value
typedef std::map< std::string, std::map< std::string, std::map< int, std::map< int, double > > > > MapMktIndexData;
typedef std::map< std::string, std::map< std::string, std::map< int, std::map< int, double > > > >::iterator It_MktIndexData;
class CMarketIndexDataContainer
{
MapMktIndexData mp_MktIndexContainer;
public:
CMarketIndexDataContainer();
~CMarketIndexDataContainer();
void AddIndex (std::string & stMarket, std::string & stTradeTime, std::string& stMktSector, std::string& stSectorIndex);
bool DayKeyPresent ( int nDayHour, std::string& stDay);
void ExtractDayHourMin (std::string& stTime, int& nDayHour, int& nMin);
bool GetDayHourMarketIndGraphData(std::string& stMktKey, std::string& stDayHour, std::string& stMktGraphData);
bool GetDayMarketIndGraphData(std::string& stMktKey, std::string& stDay, std::string& stMktGraphData);
void TrimSecs (std::string& stTime);
};
#endif