Pol  Revision:3cfda13
state.h
Go to the documentation of this file.
1 #ifndef GLOBALS_STATE_H
2 #define GLOBALS_STATE_H
3 
4 #include <atomic>
5 #include <boost/noncopyable.hpp>
6 #include <time.h>
7 
8 #include "../../clib/clib.h"
9 #include "../../clib/rawtypes.h"
10 #include "../polsig.h"
11 #include "../profile.h"
12 #include "../uobjcnt.h"
13 
14 namespace Pol
15 {
16 namespace Core
17 {
18 const u32 CHARACTERSERIAL_START = 0x00000001Lu;
19 const u32 CHARACTERSERIAL_END = 0x3FFFFFFFLu;
20 const u32 ITEMSERIAL_START = 0x40000000Lu;
21 const u32 ITEMSERIAL_END = 0x7FffFFffLu;
22 
23 
24 class StateManager : boost::noncopyable
25 {
26 public:
27  StateManager();
28  ~StateManager();
29  size_t estimateSize() const;
30 
31  void deinitialize();
32 
33  const char* last_checkpoint;
34 
37 
41 
42  std::atomic<clock_t> polclock_paused_at;
43 
46 
48 
50 
53 
55 
56  struct
57  {
63 
64  std::atomic<int> checkin_clock_times_out_at;
65 };
66 
68 }
69 }
70 #endif
const char * last_checkpoint
Definition: state.h:33
unsigned int stored_last_char_serial
Definition: state.h:45
size_t cycles_per_decay_worldzone
Definition: state.h:35
bool gflag_in_system_load
Definition: state.h:39
ProfileVars profilevars
Definition: state.h:47
unsigned int u32
Definition: rawtypes.h:27
const u32 CHARACTERSERIAL_START
Definition: state.h:18
const u32 CHARACTERSERIAL_END
Definition: state.h:19
size_t estimateSize() const
Definition: state.cpp:35
size_t cycles_until_decay_worldzone
Definition: state.h:36
unsigned int stored_last_item_serial
Definition: state.h:44
struct Pol::Core::StateManager::@8 decay_statistics
Clib::OnlineStatistics active_decay
Definition: state.h:59
std::atomic< clock_t > polclock_paused_at
Definition: state.h:42
std::atomic< int > checkin_clock_times_out_at
Definition: state.h:64
StateManager stateManager
Definition: state.cpp:8
bool gflag_enforce_container_limits
Definition: state.h:38
const u32 ITEMSERIAL_START
Definition: state.h:20
Clib::OnlineStatistics decayed
Definition: state.h:58
bool gflag_in_system_startup
Definition: state.h:40
Definition: berror.cpp:12
const u32 ITEMSERIAL_END
Definition: state.h:21
UObjCount uobjcount
Definition: state.h:49