1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-02 05:22:26 +03:00

Provider type abstraction, partially completed.

This commit is contained in:
Teemu Ollakka
2018-06-09 23:28:02 +03:00
parent 2cecb3defe
commit e74b214c9c
15 changed files with 646 additions and 263 deletions

View File

@ -0,0 +1,28 @@
//
// Copyright (C) 2018 Codership Oy <info@codership.com>
//
#ifndef WSREP_CLIENT_ID_HPP
#define WSREP_CLIENT_ID_HPP
namespace wsrep
{
class client_id
{
public:
typedef unsigned long long type;
client_id()
: id_(-1)
{ }
template <typename I>
client_id(I id)
: id_(static_cast<type>(id))
{ }
type get() const { return id_; }
static type invalid() { return -1; }
private:
type id_;
};
}
#endif // WSREP_CLIENT_ID_HPP