plebble
policies.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 #ifndef USGOV_6c9e30b55f8a9529f6284516edcde739a1fb239a4ec9403f8f7614eb8da58f0d
18 #define USGOV_6c9e30b55f8a9529f6284516edcde739a1fb239a4ec9403f8f7614eb8da58f0d
19 
20 #include <string>
21 #include <array>
22 
23 namespace us { namespace gov {
24 namespace engine {
25  using namespace std;
26  struct param_t {
27  enum consensus_t { majority=0, average, median, num_types };
28  constexpr static array<const char*,num_types> typestr={"majority","average","median"};
29 
30  param_t(int id, consensus_t type): id(id), consensus_type(type) {}
31  inline bool operator <(const param_t& other) const { return id < other.id; }
32 
33  int id;
35  };
36 
37 }}
38 }
39 #endif
40 
us::gov::engine::param_t::param_t
param_t(int id, consensus_t type)
Definition: policies.h:30
us
Definition: daemon.h:22
us::gov
Definition: daemon.h:22
us::gov::engine::param_t::id
int id
Definition: policies.h:33
us::gov::engine::param_t
Definition: policies.h:26
std
Definition: app.h:380
policies.h
us::gov::engine::param_t::consensus_type
consensus_t consensus_type
Definition: policies.h:34
us::gov::engine::param_t::consensus_t
consensus_t
Definition: policies.h:27