-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathUtil.h
More file actions
38 lines (31 loc) · 916 Bytes
/
Util.h
File metadata and controls
38 lines (31 loc) · 916 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
/** --------------------------------------------------------------------------
* Util.h
*
* A few very basic utility functions for WebSocketServer
*
* Author : Jason Kruse <jason@jasonkruse.com> or @mnisjk
* Copyright : 2014
* License : BSD (see LICENSE)
* --------------------------------------------------------------------------
**/
#ifndef _UTIL_H
#define _UTIL_H
#include <string>
#include <syslog.h>
#include <iostream>
#include <sstream>
using namespace std;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/// Util
/// ---------
class Util
{
public:
static void log( const string& message );
static void log( const char* message );
template<typename T>
static inline string toString(T t) { stringstream s; s << t; return s.str(); }
};
// Util.h
#endif