Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/merger/src/network/GameStateManager.h @ 486

Last change on this file since 486 was 332, checked in by nicolasc, 17 years ago

merge network

File size: 998 bytes
Line 
1//
2// C++ Interface: GameStateManager
3//
4// Description:
5//
6//
7// Author:  Oliver Scheuss, (C) 2007
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef NETWORK_GAMESTATEMANAGER_H
13#define NETWORK_GAMESTATEMANAGER_H
14
15#include "Synchronisable.h"
16#include "orxonox/core/IdentifierIncludes.h"
17#include "orxonox/core/Iterator.h"
18
19namespace network {
20
21/**
22 * This struct defines a gamestate:
23 * size: total size of the data in *data
24 * data: pointer to the data allocated in the memory
25 */
26  struct GameState{
27  int id;
28  int size;
29  unsigned char *data;
30};
31
32/**
33 * This Class implements a manager for gamestates:
34 * - creating snapshots of gamestates
35 * - writing gamestates to universe
36 * - diffing gamestates ?
37 * @author Oliver Scheuss
38*/
39class GameStateManager{
40public:
41  GameStateManager();
42  ~GameStateManager();
43  GameState getSnapshot(int id);
44  bool loadSnapshot(GameState state);
45private:
46  bool removeObject(orxonox::Iterator<Synchronisable> it);
47
48};
49
50}
51
52#endif
Note: See TracBrowser for help on using the repository browser.