-
Notifications
You must be signed in to change notification settings - Fork 0
/
DateRangeValues.h
47 lines (35 loc) · 1.13 KB
/
DateRangeValues.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
38
39
40
41
42
43
44
45
46
47
#pragma once
// CDateRangeValue command target
class DR_ITEM
{
public:
COleDateTime StartTime;
COleDateTime EndTime;
double Value;
};
class CDateRangeValues : public CObject
{
protected:
CObList* pItemList;
bool m_Enabled;
int FileFormatVersion;
public:
CDateRangeValues();
virtual ~CDateRangeValues();
CDateRangeValues& operator =(CDateRangeValues& DRV);
bool GetItem(int Index, DR_ITEM& theItem);
DR_ITEM* GetItemPtr(int Index);
bool GetActiveItem(COleDateTime theDate, DR_ITEM& theItem);
bool GetActiveValue(COleDateTime theDate, double& theValue);
void AddItem(DR_ITEM& theItem);
void AddItem(COleDateTime theStartTime, COleDateTime theEndTime, double theValue);
void AddItem(CString theStartTimeStg, CString theEndTimeStg, double theValue);
void DeleteItem(int Index);
int GetCount();
void ClearAll();
void Serialize(CArchive& ar, int Version);
void Copy(CDateRangeValues* pDestination);
bool IsEnabled() {return m_Enabled;}
void SetEnabled(bool EnableVal) {m_Enabled = EnableVal;}
void SetFileFormatVersion(int version) {FileFormatVersion = version;}
};