mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add the skeleton of the new client app.
This commit is contained in:
35
lib/globals.h
Normal file
35
lib/globals.h
Normal 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
|
||||
Reference in New Issue
Block a user