10 #include "../headers/KeyValue.h"
18 if(Selection < 0 || Selection >
GetCount())
44 for(
int A = 0; A < KeyValue.
GetCount(); A++)
89 transform(Value.begin(),Value.end(),Value.begin(), ::tolower);
91 for(
int A = 0; A <
GetCount(); A++) {
93 transform(Text.begin(),Text.end(),Text.begin(), ::tolower);
95 if(Text.find(Value) != string::npos)
151 vector<int> IntArray;
154 for(
unsigned int A = 0;A < StringArray.size();A++)
155 IntArray.push_back(stoi(StringArray[A]));
158 StringArray.shrink_to_fit();
165 vector<int> IntArray;
168 for(
unsigned int A = 0;A < StringArray.size();A++)
169 IntArray.push_back(stoi(StringArray[A]));
172 StringArray.shrink_to_fit();
179 for(
int A = 0; A <
GetCount(); A++){
195 vector<string> OutArray;
197 for(
int A = 0; A < B; A++){
198 if(In[A] == Split[0]){
199 OutArray.push_back(Hold);
206 OutArray.push_back(Hold);
226 for(
int A = 0; A <
GetCount(); A++) {
228 SQL.push_back(
"UPDATE " + TableName +
" SET Value = '" +
GetValue(A) +
"' WHERE Key = '" +
GetKey(A) +
"';");
A Key and Value Type Storage.
vector< string > HK_SettingKey
HK_KeyValue()
Constructor.
void SetDirty(int Selection)
vector< string > GetArray(int Selection)
Returns The Selected Value As An Array Of Strings.
void Clear()
Clears All Internal Data And Shrinks The Storage.
vector< string > HK_SettingValue
int FindSelection(string Key)
Finds Selection By Matching The Input To A Key.
string GetKey(int Selection)
Returns The Selected Key As A String.
void Add(string Key, string Value)
Adds A Key And Value;.
void SetError()
Pushes An Error To The The End Of Vectors For A Return Value If Nothing Is Found.
void SetValue(int Selection, string Value)
Sets Value For Selection. Sets Dirty As Well.
vector< int > GetIntArray(int Selection)
Returns The Selected Value As An Array Of Integers.
int GetInt(int Selection)
Returns The Selected Setting Value As An Integer.
vector< string > SplitStrings(string In, string Split)
Converts A String Into An Array.
bool IsDirty(int Selection)
Returns True If Selected Setting Is Dirty.
int GetCount()
Return The Amount Of Setting Keys Stored.
void SetClean(int Selection)
Clears The Dirty Status For The Selected Setting.
vector< string > GetUpdate(string TableName)
Returns An SQL Statement Updating All Settings Marked Dirty. Marks All Clean.
int CheckSelection(int Selection)
Checks Selection And Returns An Error If Out Of Bounds.
string GetValue(int Selection)
Returns The Selected Setting Value As A String.
HK_KeyValue Search(string Value)
Returns A HK_KeyValue Object With Matches To Value.