Add the skeleton of the new client app.

This commit is contained in:
David Given
2018-10-20 13:28:20 +02:00
parent 8648405710
commit 7efaae2f76
13 changed files with 568 additions and 0 deletions

35
lib/globals.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef GLOBALS_H
#define GLOBALS_H
#include <vector>
#include <map>
#include <string>
#include <sstream>
#include <iostream>
#include <functional>
typedef int nanoseconds_t;
extern double getCurrentTime();
class Error
{
public:
~Error()
{
std::cerr << "Error: " << _stream.str() << std::endl;
exit(1);
}
template <typename T>
Error& operator<<(T&& t)
{
_stream << t;
return *this;
}
private:
std::stringstream _stream;
};
#endif