A coarse-grained region of external memory. More...
#include <sifteo/filesystem.h>
Public Types | |
enum | Type { T_GAME = _SYS_FS_VOL_GAME, T_LAUNCHER = _SYS_FS_VOL_LAUNCHER } |
Enumeration of common volume types. More... | |
Public Member Functions | |
void | exec () const |
Transfer control to a new program. More... | |
operator const _SYSVolumeHandle () const | |
Implicit conversion to system object. | |
bool | operator!= (_SYSVolumeHandle other) const |
Inequality comparison operator. | |
bool | operator== (_SYSVolumeHandle other) const |
Equality comparison operator. | |
Volume () | |
Default constructor, leaves the Volume with an invalid value of zero. | |
Volume (_SYSVolumeHandle vh) | |
Initialize from a system object. | |
Static Public Member Functions | |
template<unsigned T> | |
static void | list (unsigned volType, Array< Volume, T > &volumes) |
List all volumes of the specified type. More... | |
static Volume | previous () |
Return the Volume corresponding to the previously running program. More... | |
static Volume | running () |
Return the Volume corresponding to the currently running program. More... | |
A coarse-grained region of external memory.
Volumes are used by the operating system for various purposes, including storing games.
Typical games will not need Volume objects. They are only useful if you need to launch or retrieve data from other programs or other bundles of data which were installed separately from your game.
|
inline |
Transfer control to a new program.
Fully replaces the current program in memory. Does not return. For Volumes containing a valid ELF binary only.
This does not automatically call System::setCubeRange() on behalf of the new program, nor does it load any bootstrap assets. Both of these tasks are typically done by the Launcher app, before calling exec(), by reading the volume metadata with MappedVolume::metadata().
|
inlinestatic |
List all volumes of the specified type.
Populates an Array with the results.
|
inlinestatic |
Return the Volume corresponding to the previously running program.
This refers to the program that was running before the last exec(). For normal games, this will always be the Volume associated with the system launcher.
If there was no previously running program (the system booted directly into the current Volume) this returns a volume with the invalid value of zero.
|
inlinestatic |
Return the Volume corresponding to the currently running program.
This can be used in various ways, such as skipping the current game in a listing of other games, reading your own metadata, or accessing saved objects that belong to you.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen