forked from tiendan/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutputMethods.h
More file actions
45 lines (34 loc) · 719 Bytes
/
Copy pathOutputMethods.h
File metadata and controls
45 lines (34 loc) · 719 Bytes
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
#pragma once
#include <netinet/in.h>
#include "GazeTracker.h"
class AbstractStore {
public:
virtual ~AbstractStore();
virtual void store() = 0;
};
class MmapStore: public AbstractStore {
public:
MmapStore(const char *filename="/tmp/gaze-mouse");
virtual ~MmapStore();
virtual void store();
private:
int _fileDescriptor;
int *_positionTable;
};
class StreamStore: public AbstractStore {
public:
StreamStore(std::ostream &stream);
virtual ~StreamStore();
virtual void store();
private:
std::ostream &_stream;
};
class SocketStore: public AbstractStore {
public:
SocketStore(int port=20320);
virtual ~SocketStore();
virtual void store();
private:
int _mySocket;
struct sockaddr_in _destAddr;
};