28 void setActor(
const std::string & actor,
bool is_guess);
35 time_t seconds,
int limit);
37 const std::string & actor_filter, time_t seconds);
52 const std::list<ActionRow> & rows);
53 const std::list<ActionRow>
getRowsSince(time_t firstTime,
54 const std::string & actor);
56 int range,
int limit);
58 int range,
int limit);
60 const std::string & actor =
"");
62 time_t suspect_t,
v3s16 action_p, time_t action_t);
Definition rollback_interface.h:97
static float getSuspectNearness(bool is_guess, v3s16 suspect_p, time_t suspect_t, v3s16 action_p, time_t action_t)
Definition rollback.cpp:650
void flush()
Definition rollback.cpp:765
sqlite3_stmt * stmt_knownNode_insert
Definition rollback.h:83
void reportAction(const RollbackAction &action_)
Definition rollback.cpp:675
std::list< RollbackAction > getRevertActions(const std::string &actor_filter, time_t seconds)
Definition rollback.cpp:807
std::string getSuspect(v3s16 p, float nearness_shortcut, float min_nearness)
Definition rollback.cpp:722
int getNodeId(const std::string &name)
Definition rollback.cpp:142
std::string current_actor
Definition rollback.h:67
void registerNewActor(const int id, const std::string &name)
Definition rollback.cpp:108
const std::list< ActionRow > getRowsSince_range(time_t firstTime, v3s16 p, int range, int limit)
Definition rollback.cpp:614
std::vector< Entity > knownActors
Definition rollback.h:85
bool current_actor_is_guess
Definition rollback.h:68
std::vector< Entity > knownNodes
Definition rollback.h:86
RollbackManager(const std::string &world_path, IGameDef *gamedef)
Definition rollback.cpp:77
sqlite3_stmt * stmt_select
Definition rollback.h:77
bool registerRow(const ActionRow &row)
Definition rollback.cpp:364
~RollbackManager()
Definition rollback.cpp:90
sqlite3_stmt * stmt_select_range
Definition rollback.h:78
bool isActorGuess()
Definition rollback.cpp:711
const std::list< RollbackAction > getActionsSince(time_t firstTime, const std::string &actor="")
Definition rollback.cpp:641
void addAction(const RollbackAction &action)
Definition rollback.cpp:786
const std::list< RollbackAction > rollbackActionsFromActionRows(const std::list< ActionRow > &rows)
Definition rollback.cpp:551
sqlite3_stmt * stmt_knownActor_insert
Definition rollback.h:81
bool initDatabase()
Definition rollback.cpp:235
void setActor(const std::string &actor, bool is_guess)
Definition rollback.cpp:716
sqlite3_stmt * stmt_knownActor_select
Definition rollback.h:80
const char * getActorName(const int id)
Definition rollback.cpp:162
void registerNewNode(const int id, const std::string &name)
Definition rollback.cpp:115
sqlite3_stmt * stmt_select_withActor
Definition rollback.h:79
bool createTables()
Definition rollback.cpp:188
std::list< RollbackAction > action_latest_buffer
Definition rollback.h:71
ActionRow actionRowFromRollbackAction(const RollbackAction &action)
Definition rollback.cpp:516
const char * getNodeName(const int id)
Definition rollback.cpp:175
std::list< RollbackAction > getNodeActors(v3s16 pos, int range, time_t seconds, int limit)
Definition rollback.cpp:797
IGameDef * gamedef
Definition rollback.h:65
std::list< RollbackAction > action_todisk_buffer
Definition rollback.h:70
const std::list< RollbackAction > getActionsSince_range(time_t firstTime, v3s16 p, int range, int limit)
Definition rollback.cpp:634
const std::list< ActionRow > getRowsSince(time_t firstTime, const std::string &actor)
Definition rollback.cpp:598
std::string getActor()
Definition rollback.cpp:706
sqlite3_stmt * stmt_insert
Definition rollback.h:75
sqlite3 * db
Definition rollback.h:74
const std::list< ActionRow > actionRowsFromSelect(sqlite3_stmt *stmt)
Definition rollback.cpp:449
std::string database_path
Definition rollback.h:73
sqlite3_stmt * stmt_replace
Definition rollback.h:76
int getActorId(const std::string &name)
Definition rollback.cpp:122
sqlite3_stmt * stmt_knownNode_select
Definition rollback.h:82
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
Definition rollback.cpp:50
Definition rollback.cpp:70
Definition rollback_interface.h:40
static std::string p(std::string path)
Definition test_filesys.cpp:53