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

SaveStateDescriptor Class Reference

Object describing a save state. More...

#include <savestate.h>

Collaboration diagram for SaveStateDescriptor:

List of all members.

Public Member Functions

 SaveStateDescriptor ()
 SaveStateDescriptor (int s, const Common::String &d)
void setSaveSlot (int slot)
int getSaveSlot () const
void setDescription (const Common::String &desc)
const Common::StringgetDescription () const
void setDeletableFlag (bool state)
 Optional entries only included when querying via MetaEngine::querySaveMetaInfo.
bool getDeletableFlag () const
 Queries whether the save state is allowed to be deleted.
void setWriteProtectedFlag (bool state)
 Defines whether the save state is write protected.
bool getWriteProtectedFlag () const
 Queries whether the save state is write protected.
void setLocked (bool state)
 Defines whether the save state is "locked" because is being synced.
bool getLocked () const
 Queries whether the save state is "locked" because is being synced.
const Graphics::SurfacegetThumbnail () const
 Return a thumbnail graphics surface representing the savestate visually.
void setThumbnail (Graphics::Surface *t)
 Set a thumbnail graphics surface representing the savestate visually.
void setThumbnail (Common::SharedPtr< Graphics::Surface > t)
void setSaveDate (int year, int month, int day)
 Sets the date the save state was created.
const Common::StringgetSaveDate () const
 Queries a human readable description of the date the save state was created.
void setSaveTime (int hour, int min)
 Sets the time the save state was created.
const Common::StringgetSaveTime () const
 Queries a human readable description of the time the save state was created.
void setPlayTime (int hours, int minutes)
 Sets the time the game was played before the save state was created.
void setPlayTime (uint32 msecs)
 Sets the time the game was played before the save state was created.
const Common::StringgetPlayTime () const
 Queries a human readable description of the time the game was played before the save state was created.
uint32 getPlayTimeMSecs () const
 Returns the time the game was played before the save state was created in milliseconds.

Private Attributes

int _slot
 The saveslot id, as it would be passed to the "-x" command line switch.
Common::String _description
 A human readable description of the save state.
bool _isDeletable
 Whether the save state can be deleted.
bool _isWriteProtected
 Whether the save state is write protected.
bool _isLocked
 Whether the save state is "locked" because is being synced.
Common::String _saveDate
 Human readable description of the date the save state was created.
Common::String _saveTime
 Human readable description of the time the save state was created.
Common::String _playTime
 Human readable description of the time the game was played till the save state was created.
uint32 _playTimeMSecs
 The time the game was played before the save state was created in milliseconds.
Common::SharedPtr
< Graphics::Surface
_thumbnail
 The thumbnail of the save state.

Detailed Description

Object describing a save state.

This at least includes the save slot number and a human readable description of the save state.

Further possibilites are a thumbnail, play time, creation date, creation time, delete protected, write protection.

Saves are writable and deletable by default.

Definition at line 45 of file savestate.h.


Constructor & Destructor Documentation

SaveStateDescriptor::SaveStateDescriptor (  ) 

Definition at line 27 of file savestate.cpp.

SaveStateDescriptor::SaveStateDescriptor ( int  s,
const Common::String d 
)

Definition at line 33 of file savestate.cpp.


Member Function Documentation

bool SaveStateDescriptor::getDeletableFlag (  )  const [inline]

Queries whether the save state is allowed to be deleted.

Definition at line 80 of file savestate.h.

const Common::String& SaveStateDescriptor::getDescription (  )  const [inline]
Returns:
A human readable description of the save state.

Definition at line 68 of file savestate.h.

bool SaveStateDescriptor::getLocked (  )  const [inline]

Queries whether the save state is "locked" because is being synced.

Definition at line 108 of file savestate.h.

const Common::String& SaveStateDescriptor::getPlayTime (  )  const [inline]

Queries a human readable description of the time the game was played before the save state was created.

This will return an empty string in case the value is not set.

Definition at line 178 of file savestate.h.

uint32 SaveStateDescriptor::getPlayTimeMSecs (  )  const [inline]

Returns the time the game was played before the save state was created in milliseconds.

It defaults to 0.

Definition at line 186 of file savestate.h.

const Common::String& SaveStateDescriptor::getSaveDate (  )  const [inline]

Queries a human readable description of the date the save state was created.

This will return an empty string in case the value is not set.

Definition at line 140 of file savestate.h.

int SaveStateDescriptor::getSaveSlot (  )  const [inline]
Returns:
The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 58 of file savestate.h.

const Common::String& SaveStateDescriptor::getSaveTime (  )  const [inline]

Queries a human readable description of the time the save state was created.

This will return an empty string in case the value is not set.

Definition at line 155 of file savestate.h.

const Graphics::Surface* SaveStateDescriptor::getThumbnail (  )  const [inline]

Return a thumbnail graphics surface representing the savestate visually.

This is usually a scaled down version of the game graphics. The size should be either 160x100 or 160x120 pixels, depending on the aspect ratio of the game. If another ratio is required, contact the core team.

Definition at line 116 of file savestate.h.

bool SaveStateDescriptor::getWriteProtectedFlag (  )  const [inline]

Queries whether the save state is write protected.

Definition at line 90 of file savestate.h.

void SaveStateDescriptor::setDeletableFlag ( bool  state  )  [inline]

Optional entries only included when querying via MetaEngine::querySaveMetaInfo.

Defines whether the save state is allowed to be deleted.

Definition at line 75 of file savestate.h.

void SaveStateDescriptor::setDescription ( const Common::String desc  )  [inline]
Parameters:
desc A human readable description of the save state.

Definition at line 63 of file savestate.h.

void SaveStateDescriptor::setLocked ( bool  state  )  [inline]

Defines whether the save state is "locked" because is being synced.

Definition at line 95 of file savestate.h.

void SaveStateDescriptor::setPlayTime ( int  hours,
int  minutes 
)

Sets the time the game was played before the save state was created.

Parameters:
hours How many hours the user played the game so far.
minutes How many minutes the user played the game so far.

Definition at line 53 of file savestate.cpp.

void SaveStateDescriptor::setPlayTime ( uint32  msecs  ) 

Sets the time the game was played before the save state was created.

Parameters:
msecs How many milliseconds the user played the game so far.

Definition at line 58 of file savestate.cpp.

void SaveStateDescriptor::setSaveDate ( int  year,
int  month,
int  day 
)

Sets the date the save state was created.

Parameters:
year Year of creation.
month Month of creation.
day Day of creation.

Definition at line 45 of file savestate.cpp.

void SaveStateDescriptor::setSaveSlot ( int  slot  )  [inline]
Parameters:
slot The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 53 of file savestate.h.

void SaveStateDescriptor::setSaveTime ( int  hour,
int  min 
)

Sets the time the save state was created.

Parameters:
hour Hour of creation.
min Minute of creation.

Definition at line 49 of file savestate.cpp.

void SaveStateDescriptor::setThumbnail ( Graphics::Surface t  ) 

Set a thumbnail graphics surface representing the savestate visually.

Ownership of the surface is transferred to the SaveStateDescriptor. Hence the caller must not delete the surface.

Definition at line 38 of file savestate.cpp.

void SaveStateDescriptor::setThumbnail ( Common::SharedPtr< Graphics::Surface t  )  [inline]

Definition at line 124 of file savestate.h.

void SaveStateDescriptor::setWriteProtectedFlag ( bool  state  )  [inline]

Defines whether the save state is write protected.

Definition at line 85 of file savestate.h.


Member Data Documentation

A human readable description of the save state.

Definition at line 197 of file savestate.h.

Whether the save state can be deleted.

Definition at line 202 of file savestate.h.

Whether the save state is "locked" because is being synced.

Definition at line 212 of file savestate.h.

Whether the save state is write protected.

Definition at line 207 of file savestate.h.

Human readable description of the time the game was played till the save state was created.

Definition at line 228 of file savestate.h.

The time the game was played before the save state was created in milliseconds.

Definition at line 234 of file savestate.h.

Human readable description of the date the save state was created.

Definition at line 217 of file savestate.h.

Human readable description of the time the save state was created.

Definition at line 222 of file savestate.h.

The saveslot id, as it would be passed to the "-x" command line switch.

Definition at line 192 of file savestate.h.

The thumbnail of the save state.

Definition at line 239 of file savestate.h.


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


Generated on Sat Nov 16 2019 05:02:16 for ResidualVM by doxygen 1.7.1
curved edge   curved edge