The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
synced_checkup Class Reference

This checkup compares whether the results calculated during the original game match the ones calculated during replay. More...

#include <synced_checkup.hpp>

Inheritance diagram for synced_checkup:
Inheritance graph

Public Member Functions

 synced_checkup (config &buffer)
 
virtual ~synced_checkup ()
 
virtual bool local_checkup (const config &expected_data, config &real_data)
 Compares data to the results calculated during the original game. More...
 
- Public Member Functions inherited from checkup
 checkup ()
 
virtual ~checkup ()
 

Private Attributes

configbuffer_
 
unsigned int pos_
 

Detailed Description

This checkup compares whether the results calculated during the original game match the ones calculated during replay.

Whether this checkup also compares the calculated results of different clients in a a mp game depends on whether there was already data sended about the current synced command.

Definition at line 44 of file synced_checkup.hpp.

Constructor & Destructor Documentation

synced_checkup::synced_checkup ( config buffer)

Definition at line 55 of file synced_checkup.cpp.

synced_checkup::~synced_checkup ( )
virtual

Definition at line 60 of file synced_checkup.cpp.

Member Function Documentation

bool synced_checkup::local_checkup ( const config expected_data,
config real_data 
)
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.

Implements checkup.

Definition at line 64 of file synced_checkup.cpp.

References config::add_child(), buffer_, config::child(), config::child_count(), config::empty(), and pos_.

Member Data Documentation

config& synced_checkup::buffer_
private

Definition at line 51 of file synced_checkup.hpp.

Referenced by local_checkup().

unsigned int synced_checkup::pos_
private

Definition at line 52 of file synced_checkup.hpp.

Referenced by local_checkup().


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