ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Resource state provider. More...

#include <stateprovider.h>

Collaboration diagram for Stark::StateProvider:

List of all members.

Classes

class  ResourceTreeState

Public Member Functions

 ~StateProvider ()
void restoreLevelState (Resources::Level *level)
void restoreCurrentLevelState (Resources::Level *level)
void restoreLocationState (Resources::Level *level, Resources::Location *location)
void restoreCurrentLocationState (Resources::Level *level, Resources::Location *location)
void restoreGlobalState (Resources::Level *level)
void saveLevelState (Resources::Level *level)
void saveCurrentLevelState (Resources::Level *level)
void saveLocationState (Resources::Level *level, Resources::Location *location)
void saveCurrentLocationState (Resources::Level *level, Resources::Location *location)
void saveGlobalState (Resources::Level *level)
void readStateFromStream (StateReadStream *stream, uint saveVersion)
 Replace the current states by those read from the stream.
void writeStateToStream (Common::WriteStream *stream)
 Write the states in the store to a stream.
void clear ()
 Clear all the state, effectively preparing to start a new game.

Static Public Attributes

static const uint kMinSaveVersion = 6
static const uint kSaveVersion = 12

Private Types

typedef Common::HashMap
< Common::String,
ResourceTreeState * > 
ResourceTreeStateMap

Private Member Functions

void restoreResourceTreeState (const Common::String &storeKey, Resources::Object *root, bool current)
void saveResourceTreeState (const Common::String &storeKey, Resources::Object *root, bool current)
void readResourceTree (Resources::Object *resource, Common::SeekableReadStream *stream, bool current, uint32 version)
void writeResourceTree (Resources::Object *resource, Common::WriteStream *stream, bool current)

Private Attributes

ResourceTreeStateMap _stateStore

Detailed Description

Resource state provider.

Maintains a serialized version of the state of the resource trees.

Definition at line 104 of file stateprovider.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Stark::StateProvider::~StateProvider (  ) 

Definition at line 63 of file stateprovider.cpp.


Member Function Documentation

void Stark::StateProvider::clear (  ) 

Clear all the state, effectively preparing to start a new game.

Definition at line 67 of file stateprovider.cpp.

void Stark::StateProvider::readResourceTree ( Resources::Object resource,
Common::SeekableReadStream stream,
bool  current,
uint32  version 
) [private]

Definition at line 107 of file stateprovider.cpp.

void Stark::StateProvider::readStateFromStream ( StateReadStream stream,
uint  saveVersion 
)

Replace the current states by those read from the stream.

Definition at line 200 of file stateprovider.cpp.

void Stark::StateProvider::restoreCurrentLevelState ( Resources::Level level  ) 

Definition at line 80 of file stateprovider.cpp.

void Stark::StateProvider::restoreCurrentLocationState ( Resources::Level level,
Resources::Location location 
)

Definition at line 90 of file stateprovider.cpp.

void Stark::StateProvider::restoreGlobalState ( Resources::Level level  ) 

Definition at line 94 of file stateprovider.cpp.

void Stark::StateProvider::restoreLevelState ( Resources::Level level  ) 

Definition at line 74 of file stateprovider.cpp.

void Stark::StateProvider::restoreLocationState ( Resources::Level level,
Resources::Location location 
)

Definition at line 84 of file stateprovider.cpp.

void Stark::StateProvider::restoreResourceTreeState ( const Common::String storeKey,
Resources::Object root,
bool  current 
) [private]

Definition at line 98 of file stateprovider.cpp.

void Stark::StateProvider::saveCurrentLevelState ( Resources::Level level  ) 

Definition at line 140 of file stateprovider.cpp.

void Stark::StateProvider::saveCurrentLocationState ( Resources::Level level,
Resources::Location location 
)

Definition at line 150 of file stateprovider.cpp.

void Stark::StateProvider::saveGlobalState ( Resources::Level level  ) 

Definition at line 154 of file stateprovider.cpp.

void Stark::StateProvider::saveLevelState ( Resources::Level level  ) 

Definition at line 134 of file stateprovider.cpp.

void Stark::StateProvider::saveLocationState ( Resources::Level level,
Resources::Location location 
)

Definition at line 144 of file stateprovider.cpp.

void Stark::StateProvider::saveResourceTreeState ( const Common::String storeKey,
Resources::Object root,
bool  current 
) [private]

Definition at line 158 of file stateprovider.cpp.

void Stark::StateProvider::writeResourceTree ( Resources::Object resource,
Common::WriteStream stream,
bool  current 
) [private]

Definition at line 173 of file stateprovider.cpp.

void Stark::StateProvider::writeStateToStream ( Common::WriteStream stream  ) 

Write the states in the store to a stream.

Definition at line 227 of file stateprovider.cpp.


Member Data Documentation

Definition at line 129 of file stateprovider.h.

Definition at line 130 of file stateprovider.h.


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


Generated on Sat May 18 2019 05:07:18 for ResidualVM by doxygen 1.7.1
curved edge   curved edge