forked from opengazer/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathOutputMethods.h
36 lines (32 loc) · 834 Bytes
/
OutputMethods.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
#pragma once
#include "utils.h"
#include "GazeTracker.h"
#include <netinet/in.h>
class AbstractStore {
public:
virtual void store(const TrackerOutput& output) = 0;
virtual ~AbstractStore();
};
class MmapStore: public AbstractStore {
int fd;
int *positiontable;
public:
MmapStore(const char *filename="/tmp/gaze-mouse");
virtual void store(const TrackerOutput& output);
virtual ~MmapStore();
};
class StreamStore: public AbstractStore {
ostream &stream;
public:
StreamStore(ostream &stream);
virtual void store(const TrackerOutput& output);
virtual ~StreamStore();
};
class SocketStore: public AbstractStore {
int mysocket;
struct sockaddr_in destaddr;
public:
SocketStore(int port=20320);
virtual void store(const TrackerOutput& output);
virtual ~SocketStore();
};