diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2016-03-14 20:54:37 +0100 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2016-03-31 16:43:53 +0200 |
commit | fe91611cb1c484429f2fdc958732337a5fc38fa8 (patch) | |
tree | e91133c9a9dff6f1dbba46c5110cd203dc0ddc55 /infomanager.hpp | |
parent | languages: fix and improve german translation (diff) | |
download | android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar.gz android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar.bz2 android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar.lz android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar.xz android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.tar.zst android_bootable_recovery-fe91611cb1c484429f2fdc958732337a5fc38fa8.zip |
Diffstat (limited to '')
-rw-r--r-- | infomanager.hpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/infomanager.hpp b/infomanager.hpp index de8aef423..4ce67aa3c 100644 --- a/infomanager.hpp +++ b/infomanager.hpp @@ -28,29 +28,36 @@ using namespace std; class InfoManager { public: - InfoManager(const string filename); + InfoManager(); + explicit InfoManager(const string& filename); virtual ~InfoManager(); + void SetFile(const string& filename); + void SetFileVersion(int version); + void SetConst(); + void Clear(); int LoadValues(); int SaveValues(); // Core get routines - int GetValue(const string varName, string& value); - int GetValue(const string varName, int& value); - int GetValue(const string varName, float& value); - unsigned long long GetValue(const string varName, unsigned long long& value); + int GetValue(const string& varName, string& value); + int GetValue(const string& varName, int& value); + int GetValue(const string& varName, float& value); + unsigned long long GetValue(const string& varName, unsigned long long& value); - string GetStrValue(const string varName); - int GetIntValue(const string varName); + string GetStrValue(const string& varName); + int GetIntValue(const string& varName); // Core set routines - int SetValue(const string varName, string value); - int SetValue(const string varName, int value); - int SetValue(const string varName, float value); - int SetValue(const string varName, unsigned long long value); + int SetValue(const string& varName, const string& value); + int SetValue(const string& varName, const int value); + int SetValue(const string& varName, const float value); + int SetValue(const string& varName, const unsigned long long& value); private: string File; map<string, string> mValues; + int file_version; + bool is_const; }; |