convert file_bps to be unsigned long long

Change-Id: Ib5d9ca8f9a2a4e27d9798665b312376a7d9c571c
This commit is contained in:
bigbiff bigbiff
2013-02-19 18:08:03 +00:00
committed by Dees_Troy
parent 87e3d93edc
commit 2c57d789df
3 changed files with 31 additions and 6 deletions
+18
View File
@@ -358,6 +358,17 @@ int DataManager::GetValue(const string varName, int& value)
return 0;
}
unsigned long long DataManager::GetValue(const string varName, unsigned long long& value)
{
string data;
if (GetValue(varName,data) != 0)
return -1;
value = strtoull(data.c_str(), NULL, 10);
return 0;
}
// This is a dangerous function. It will create the value if it doesn't exist so it has a valid c_str
string& DataManager::GetValueRef(const string varName)
{
@@ -458,6 +469,13 @@ int DataManager::SetValue(const string varName, float value, int persist /* = 0
return SetValue(varName, valStr.str(), persist);;
}
int DataManager::SetValue(const string varName, unsigned long long value, int persist /* = 0 */)
{
ostringstream valStr;
valStr << value;
return SetValue(varName, valStr.str(), persist);;
}
void DataManager::DumpValues()
{
map<string, TStrIntPair>::iterator iter;