The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
checkup Class Referenceabstract

A class to check whether the results that were calculated in the replay match the results calculated during the original game. More...

#include <synced_checkup.hpp>

Inheritance diagram for checkup:
Inheritance graph

Public Member Functions

 checkup ()
 
virtual ~checkup ()
 
virtual bool local_checkup (const config &expected_data, config &real_data)=0
 Compares data to the results calculated during the original game. More...
 

Detailed Description

A class to check whether the results that were calculated in the replay match the results calculated during the original game.

note, that you shouldn't add new checkups to existent user actions or you might break replay compability by bringing the [checkups] tag of older saves in unorder.

so if you really want to add new checkups, you should wrap your checkup_instance->... call in a if(resources::state_of_game->classification.version ....) or similar.

Definition at line 24 of file synced_checkup.hpp.

Constructor & Destructor Documentation

checkup::checkup ( )

Definition at line 30 of file synced_checkup.cpp.

checkup::~checkup ( )
virtual

Definition at line 34 of file synced_checkup.cpp.

Member Function Documentation

virtual bool checkup::local_checkup ( const config expected_data,
config real_data 
)
pure virtual

Compares data to the results calculated during the original game.

It's undefined whether this function also compares calculated results from different clients in a mp game. returns whether the two config objects are equal.

Implemented in mp_debug_checkup, ignored_checkup, and synced_checkup.

Referenced by set_scontext_synced::do_final_checkup(), and actions::move_unit_internal().


The documentation for this class was generated from the following files: