-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBase.h
More file actions
38 lines (27 loc) · 780 Bytes
/
Base.h
File metadata and controls
38 lines (27 loc) · 780 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
#ifndef A_BASE_H
#define A_BASE_H
#include <mutex>
#include <condition_variable>
#include <memory>
#include <vector>
#include <unordered_map>
#include "Errors.h"
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
#ifndef DISALLOW_EVIL_CONSTRUCTORS
#define DISALLOW_EVIL_CONSTRUCTORS(name) \
name(const name &); \
name &operator=(const name &) /* NOLINT */
#endif // !DISALLOW_EVIL_CONSTRUCTORS
using MutexAutoLock = std::unique_lock<std::mutex>;
using KeyedI32Vector = std::unordered_map<int32_t, int32_t>;
using Condition = std::condition_variable;
#ifdef _WIN32
using thread_id_t = unsigned long;
#else
using thread_id_t = long long;
#endif // _WIN32
using Mutex = std::mutex;
#endif // !A_BASE_H