HatchKeeper
0.90
The Free Open-Source Egg Incubation Software
|
A Key and Value Type Storage. More...
#include <KeyValue.h>
Public Member Functions | |
HK_KeyValue () | |
Constructor. More... | |
void | Add (string Key, string Value) |
Adds A Key And Value;. More... | |
void | Add (HK_KeyValue KeyValue) |
Overloaded Adds Another HK_KeyValue To This One. More... | |
int | CheckSelection (int Selection) |
Checks Selection And Returns An Error If Out Of Bounds. More... | |
void | Clear () |
Clears All Internal Data And Shrinks The Storage. More... | |
int | FindSelection (string Key) |
Finds Selection By Matching The Input To A Key. More... | |
int | GetCount () |
Return The Amount Of Setting Keys Stored. More... | |
vector< string > | GetArray (int Selection) |
Returns The Selected Value As An Array Of Strings. More... | |
vector< string > | GetArray (string Key) |
Returns The Value As An Array Of Strings For A Key Matching The Input. More... | |
int | GetInt (int Selection) |
Returns The Selected Setting Value As An Integer. More... | |
int | GetInt (string Key) |
Returns A Setting Value As An Integer, For A Key Matching The Input. More... | |
vector< int > | GetIntArray (int Selection) |
Returns The Selected Value As An Array Of Integers. More... | |
vector< int > | GetIntArray (string Key) |
Returns The Value As An Array Of Integers For A Key Matching The Input. More... | |
string | GetKey (int Selection) |
Returns The Selected Key As A String. More... | |
vector< string > | GetUpdate (string TableName) |
Returns An SQL Statement Updating All Settings Marked Dirty. Marks All Clean. More... | |
string | GetValue (int Selection) |
Returns The Selected Setting Value As A String. More... | |
string | GetValue (string Key) |
Returns A Setting Value As A String, For A Key Matching The Input. More... | |
bool | IsDirty (int Selection) |
Returns True If Selected Setting Is Dirty. More... | |
bool | IsDirty (string Key) |
Returns True If Selected Setting Is Dirty. More... | |
HK_KeyValue | Search (string Value) |
Returns A HK_KeyValue Object With Matches To Value. More... | |
void | SetClean (int Selection) |
Clears The Dirty Status For The Selected Setting. More... | |
void | SetClean (string Key) |
Overloaded, Uses A Key Instead Of Integer Selection. More... | |
void | SetError () |
Pushes An Error To The The End Of Vectors For A Return Value If Nothing Is Found. More... | |
void | SetDirty (int Selection) |
void | SetDirty (string Key) |
Overloaded, Uses A Key Instead Of Integer Selection. More... | |
void | SetValue (int Selection, string Value) |
Sets Value For Selection. Sets Dirty As Well. More... | |
void | SetValue (string Key, string Value) |
OverLoaded, Uses Key Instead Of Integer Selection. More... | |
vector< string > | SplitStrings (string In, string Split) |
Converts A String Into An Array. More... | |
Private Attributes | |
vector< string > | HK_SettingKey |
vector< string > | HK_SettingValue |
vector< bool > | HK_Update |
HK_KeyValue::HK_KeyValue | ( | ) |
Constructor.
Definition at line 13 of file HK_KeyValue.cpp.
void HK_KeyValue::Add | ( | HK_KeyValue | KeyValue | ) |
Overloaded Adds Another HK_KeyValue To This One.
Definition at line 42 of file HK_KeyValue.cpp.
void HK_KeyValue::Add | ( | string | Key, |
string | Value | ||
) |
Adds A Key And Value;.
Definition at line 33 of file HK_KeyValue.cpp.
int HK_KeyValue::CheckSelection | ( | int | Selection | ) |
Checks Selection And Returns An Error If Out Of Bounds.
Definition at line 16 of file HK_KeyValue.cpp.
void HK_KeyValue::Clear | ( | ) |
Clears All Internal Data And Shrinks The Storage.
Definition at line 211 of file HK_KeyValue.cpp.
int HK_KeyValue::FindSelection | ( | string | Key | ) |
Finds Selection By Matching The Input To A Key.
Definition at line 178 of file HK_KeyValue.cpp.
vector< string > HK_KeyValue::GetArray | ( | int | Selection | ) |
Returns The Selected Value As An Array Of Strings.
Definition at line 140 of file HK_KeyValue.cpp.
vector< string > HK_KeyValue::GetArray | ( | string | Key | ) |
Returns The Value As An Array Of Strings For A Key Matching The Input.
Definition at line 145 of file HK_KeyValue.cpp.
int HK_KeyValue::GetCount | ( | ) |
Return The Amount Of Setting Keys Stored.
Definition at line 26 of file HK_KeyValue.cpp.
int HK_KeyValue::GetInt | ( | int | Selection | ) |
Returns The Selected Setting Value As An Integer.
Definition at line 49 of file HK_KeyValue.cpp.
int HK_KeyValue::GetInt | ( | string | Key | ) |
Returns A Setting Value As An Integer, For A Key Matching The Input.
Definition at line 55 of file HK_KeyValue.cpp.
vector< int > HK_KeyValue::GetIntArray | ( | int | Selection | ) |
Returns The Selected Value As An Array Of Integers.
Definition at line 150 of file HK_KeyValue.cpp.
vector< int > HK_KeyValue::GetIntArray | ( | string | Key | ) |
Returns The Value As An Array Of Integers For A Key Matching The Input.
Definition at line 164 of file HK_KeyValue.cpp.
string HK_KeyValue::GetKey | ( | int | Selection | ) |
Returns The Selected Key As A String.
Definition at line 61 of file HK_KeyValue.cpp.
vector< string > HK_KeyValue::GetUpdate | ( | string | TableName | ) |
Returns An SQL Statement Updating All Settings Marked Dirty. Marks All Clean.
Definition at line 222 of file HK_KeyValue.cpp.
string HK_KeyValue::GetValue | ( | int | Selection | ) |
Returns The Selected Setting Value As A String.
Definition at line 67 of file HK_KeyValue.cpp.
string HK_KeyValue::GetValue | ( | string | Key | ) |
Returns A Setting Value As A String, For A Key Matching The Input.
Definition at line 73 of file HK_KeyValue.cpp.
bool HK_KeyValue::IsDirty | ( | int | Selection | ) |
Returns True If Selected Setting Is Dirty.
Definition at line 79 of file HK_KeyValue.cpp.
bool HK_KeyValue::IsDirty | ( | string | Key | ) |
Returns True If Selected Setting Is Dirty.
Definition at line 81 of file HK_KeyValue.cpp.
HK_KeyValue HK_KeyValue::Search | ( | string | Value | ) |
Returns A HK_KeyValue Object With Matches To Value.
Definition at line 84 of file HK_KeyValue.cpp.
void HK_KeyValue::SetClean | ( | int | Selection | ) |
Clears The Dirty Status For The Selected Setting.
Definition at line 103 of file HK_KeyValue.cpp.
void HK_KeyValue::SetClean | ( | string | Key | ) |
Overloaded, Uses A Key Instead Of Integer Selection.
Definition at line 105 of file HK_KeyValue.cpp.
void HK_KeyValue::SetDirty | ( | int | Selection | ) |
Sets HK_Update To True For The Selected Setting.
This Function Gets Called Automatically When SetValue() Is Called. Calling GetSQL() Will Mark All As Clean, Or You Can Manually Call SetClean() To Veto A Setting Change.
Definition at line 115 of file HK_KeyValue.cpp.
void HK_KeyValue::SetDirty | ( | string | Key | ) |
Overloaded, Uses A Key Instead Of Integer Selection.
Definition at line 117 of file HK_KeyValue.cpp.
void HK_KeyValue::SetError | ( | ) |
Pushes An Error To The The End Of Vectors For A Return Value If Nothing Is Found.
Definition at line 120 of file HK_KeyValue.cpp.
void HK_KeyValue::SetValue | ( | int | Selection, |
string | Value | ||
) |
Sets Value For Selection. Sets Dirty As Well.
Definition at line 128 of file HK_KeyValue.cpp.
void HK_KeyValue::SetValue | ( | string | Key, |
string | Value | ||
) |
OverLoaded, Uses Key Instead Of Integer Selection.
Definition at line 134 of file HK_KeyValue.cpp.
vector< string > HK_KeyValue::SplitStrings | ( | string | In, |
string | Split | ||
) |
Converts A String Into An Array.
In | The String To Be Split |
Split | The Value To Split The String At |
Definition at line 193 of file HK_KeyValue.cpp.
|
private |
Definition at line 27 of file KeyValue.h.
|
private |
Definition at line 28 of file KeyValue.h.
|
private |
Definition at line 29 of file KeyValue.h.