Fission FSN
Loading...
Searching...
No Matches
fsCGlobalSavedData.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 28/3/2014 10:20
4*
5* File: fsCGlobalSavedData.h
6*
7* Author: Mick Waites
8*
9* Purpose: Centralised player profile information and global
10* settings.
11*
12*********************************************************************/
13
14#ifndef fsCGlobalSavedDatahdr
15#define fsCGlobalSavedDatahdr
16
17#include <memory>
18
20
21#include "../fsISavedData.h"
22
23
25{
26 friend class fsCProfileManager;
27 friend class fsCAppCoreMain;
28
29public:
30
31 static const fsS32 mNoProfileLoaded = -1;
32 static const fsStr mCurrentLocale;
33
34 fsStr uniqueIDGet() const;
35
36 fsStr currentLocaleGet() const;
37 void currentLocaleSet(fsStr const& pLocale);
38
39 void appRunningtTimeSet(fsS32 pAppRunningTime);
41
42 fsS32 numProfilesGet() const;
44 fsStr profileNameGet(fsS32 pProfileIndex) const;
45 fsCResourceName profileFileNameGet(fsS32 pProfileIndex) const;
46 fsStr profileChapterGet(fsS32 pProfileIndex) const;
47 fsS32 profileGameModeGet(fsS32 pProfileIndex) const;
48
49 virtual ~fsCGlobalSavedData();
50
51 static std::unique_ptr<fsCGlobalSavedData> create();
52
53protected:
54
55 void uniqueIDSet(const fsStr& pID);
56
57 void currentProfileIndexSet(fsS32 pProfileIndex);
58 void numProfilesSet(fsS32 pNumProfiles);
59
60 void resetToDefaultsDo() override;
61
63
64private:
65
66#if defined fsInAppPurchaseProcess
67 static const fsStr mPurchasedPayWallKey;
68#endif
69
70 static const fsStr mNumProfilesKey;
71 static const fsStr mCurrentProfileIndexKey;
72 static const fsStr mProfileNameKey;
73 static const fsStr mProfileFileNameKey;
74 static const fsStr mProfileChapterKey;
75 static const fsStr mProfileGameModeKey;
76 static const fsStr mUniqueIDKey;
77 static const fsStr mAppRunningTime;
78};
79
80#endif
void appRunningtTimeSet(fsS32 pAppRunningTime)
Definition fsCGlobalSavedData.cpp:35
fsStr profileNameGet(fsS32 pProfileIndex) const
Definition fsCGlobalSavedData.cpp:83
void numProfilesSet(fsS32 pNumProfiles)
Definition fsCGlobalSavedData.cpp:68
fsS32 numProfilesGet() const
Definition fsCGlobalSavedData.cpp:63
fsS32 profileGameModeGet(fsS32 pProfileIndex) const
Definition fsCGlobalSavedData.cpp:105
fsCResourceName profileFileNameGet(fsS32 pProfileIndex) const
Definition fsCGlobalSavedData.cpp:90
friend class fsCProfileManager
Definition fsCGlobalSavedData.h:26
friend class fsCAppCoreMain
Definition fsCGlobalSavedData.h:27
fsStr profileChapterGet(fsS32 pProfileIndex) const
Definition fsCGlobalSavedData.cpp:98
static const fsS32 mNoProfileLoaded
Definition fsCGlobalSavedData.h:31
void uniqueIDSet(const fsStr &pID)
Definition fsCGlobalSavedData.cpp:40
fsS32 appRunningtTimeGet() const
Definition fsCGlobalSavedData.cpp:30
static const fsStr mCurrentLocale
Definition fsCGlobalSavedData.h:32
fsStr uniqueIDGet() const
Definition fsCGlobalSavedData.cpp:45
virtual ~fsCGlobalSavedData()
Definition fsCGlobalSavedData.cpp:130
void currentLocaleSet(fsStr const &pLocale)
Definition fsCGlobalSavedData.cpp:25
fsS32 currentProfileIndexGet() const
Definition fsCGlobalSavedData.cpp:73
static std::unique_ptr< fsCGlobalSavedData > create()
Definition fsCGlobalSavedData.cpp:112
fsCGlobalSavedData()
Definition fsCGlobalSavedData.cpp:126
void currentProfileIndexSet(fsS32 pProfileIndex)
Definition fsCGlobalSavedData.cpp:78
fsStr currentLocaleGet() const
Definition fsCGlobalSavedData.cpp:20
void resetToDefaultsDo() override
Definition fsCGlobalSavedData.cpp:50
Definition fsCResourceName.h:32
fsISavedData()
Definition fsISavedData.cpp:27
Definition fsStr.h:23
int fsS32
Definition fsBaseTypes.h:20