-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathECGCaptureFactory.cpp
47 lines (36 loc) · 1.81 KB
/
ECGCaptureFactory.cpp
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
//
//
//
#include "ECGCaptureFactory.h"
ECGCapture* ECGCaptureFactory::createECGCapture(String mode ,String rate ,String lead)
{
HashMap<ECGCapture*> *map = createMap();
ECGCapture *ecg = map->get(mode + rate + lead);
return (ecg)? ecg : new ECGCapture();
}
HashMap<ECGCapture*>* ECGCaptureFactory::createMap()
{
HashMap<ECGCapture*> *map = new HashMap<ECGCapture*>();
map->put("ECG250HzLead1", new ECG250HzLead1Capture());
map->put("ECG250HzLead2", new ECG250HzLead2Capture());
map->put("ECG250HzLead3", new ECG250HzLead3Capture());
map->put("ECG500HzLead1", new ECG500HzLead1Capture());
map->put("ECG500HzLead2", new ECG500HzLead2Capture());
map->put("ECG500HzLead3", new ECG500HzLead3Capture());
map->put("ECG1000HzLead1", new ECG1000HzLead1Capture());
map->put("ECG1000HzLead2", new ECG1000HzLead2Capture());
map->put("ECG1000HzLead3", new ECG1000HzLead3Capture());
map->put("ECG2000HzLead1", new ECG2000HzLead1Capture());
map->put("ECG2000HzLead2", new ECG2000HzLead2Capture());
map->put("ECG2000HzLead3", new ECG2000HzLead3Capture());
map->put("TesttoneSquareWave250HzLead1", new TestToneSquareWave250HzLead1Capture());
map->put("TestToneSquareWave250HzLead2", new TestToneSquareWave250HzLead2Capture());
map->put("TestToneSquareWave250HzLead3", new TestToneSquareWave250HzLead3Capture());
map->put("TestTone10SinWave250HzLead1", new TestTone10SinWave250HzLead1Capture());
map->put("TestTone10SinWave250HzLead2", new TestTone10SinWave250HzLead2Capture());
map->put("TestTone10SinWave250HzLead3", new TestTone10SinWave250HzLead3Capture());
map->put("TestTone150SinWave250HzLead1", new TestTone150SinWave250HzLead1Capture());
map->put("TestTone150SinWave250HzLead2", new TestTone150SinWave250HzLead2Capture());
map->put("TestTone150SinWave250HzLead3", new TestTone150SinWave250HzLead3Capture());
return map;
}