HatchKeeper
0.90
The Free Open-Source Egg Incubation Software
|
A Class For Storing Values. More...
#include <Storage.h>
Public Member Functions | |
HK_Storage () | |
Constructor. More... | |
void | Add (string Name, int ID, HK_Date Date, string Text, int Number) |
Adds An Item To Storage. More... | |
void | Add (string Name, int ID, HK_Date Date, string Text) |
Overloaded Adds An Item To Storage, Without Number. More... | |
void | Add (string Name, int ID, string Text, int Number) |
Overloaded Add An Item To Storage With No Date or Number. More... | |
void | Add (string Name, int ID, string Text) |
Overloaded Add An Item To Storage With No Date or Number. More... | |
void | Add (string Name, int ID, int Number) |
Overloaded Add An Item To Storage With No Date or Text. More... | |
void | Add (string Name, int ID, HK_Date Date) |
Overloaded Add An Item To Storage With No Number or Text. More... | |
void | Clear () |
Clears All Data And Shrinks The Arrays. More... | |
int | GetCount () |
Returns The Number Of Elements Stored. More... | |
HK_Date | GetDate (int Select) |
Returns The Selected Stored Date. More... | |
int | GetDay (int Select) |
Returns The Selected Day From The Stored Date. More... | |
int | GetID (int Select) |
Returns The Selected Stored ID. More... | |
int | GetMonth (int Select) |
Returns The Selected Month From The Stored Date. More... | |
string | GetName (int Select) |
Returns The Selected Stored Name. More... | |
int | GetNumber (int Select) |
Returns The Selected Stored Number. More... | |
string | GetText (int Select) |
Returns The Selected Stored Text. More... | |
int | GetValidID () |
Returns A Valid ID For Adding Entries To The Database. More... | |
int | GetYear (int Select) |
Returns The Selected Year From The Stored Date. More... | |
bool | IsValidName (string Name) |
Returns True If Name Isn't Already In Use. More... | |
HK_KeyValue | Search (string Prefix, string Value) |
Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found. More... | |
void | SetDate (int Select, HK_Date Date) |
Sets The Selected Stored Date. More... | |
void | SetDay (int Select, int Days) |
Sets The Selected Day From The Stored Date. More... | |
void | SetID (int Select, int ID) |
Sets The Selected Stored ID. More... | |
void | SetMonth (int Select, int Month) |
Sets The Selected Month From The Stored Date. More... | |
void | SetName (int Select, string Name) |
Sets The Selected Stored Name. More... | |
void | SetNumber (int Select, int Number) |
Sets The Selected Stored Number. More... | |
void | SetText (int Select, string Text) |
Sets The Selected Stored Text. More... | |
void | SetYear (int Select, int Year) |
Sets The Selected Year From The Stored Date. More... | |
Private Attributes | |
vector< string > | HK_StoreName |
vector< int > | HK_StoreID |
vector< HK_Date > | HK_StoreDate |
vector< string > | HK_StoreText |
vector< int > | HK_StoreNumber |
A Class For Storing Values.
This class uses an Selection based system for storing and retreiving data. It contains arrays for storing Name, Id, Date, Text, and Numbers. Add() is overloaded for multiple configurations.
HK_Storage::HK_Storage | ( | ) |
Constructor.
Definition at line 12 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
HK_Date | Date | ||
) |
Overloaded Add An Item To Storage With No Number or Text.
Definition at line 54 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
HK_Date | Date, | ||
string | Text | ||
) |
Overloaded Adds An Item To Storage, Without Number.
Definition at line 24 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
HK_Date | Date, | ||
string | Text, | ||
int | Number | ||
) |
Adds An Item To Storage.
Definition at line 15 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
int | Number | ||
) |
Overloaded Add An Item To Storage With No Date or Text.
Definition at line 47 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
string | Text | ||
) |
Overloaded Add An Item To Storage With No Date or Number.
Definition at line 40 of file HK_Storage.cpp.
void HK_Storage::Add | ( | string | Name, |
int | ID, | ||
string | Text, | ||
int | Number | ||
) |
Overloaded Add An Item To Storage With No Date or Number.
Definition at line 32 of file HK_Storage.cpp.
void HK_Storage::Clear | ( | ) |
Clears All Data And Shrinks The Arrays.
Definition at line 212 of file HK_Storage.cpp.
int HK_Storage::GetCount | ( | ) |
Returns The Number Of Elements Stored.
Definition at line 101 of file HK_Storage.cpp.
HK_Date HK_Storage::GetDate | ( | int | Select | ) |
Returns The Selected Stored Date.
Definition at line 71 of file HK_Storage.cpp.
int HK_Storage::GetDay | ( | int | Select | ) |
Returns The Selected Day From The Stored Date.
Definition at line 76 of file HK_Storage.cpp.
int HK_Storage::GetID | ( | int | Select | ) |
Returns The Selected Stored ID.
Definition at line 66 of file HK_Storage.cpp.
int HK_Storage::GetMonth | ( | int | Select | ) |
Returns The Selected Month From The Stored Date.
Definition at line 81 of file HK_Storage.cpp.
string HK_Storage::GetName | ( | int | Select | ) |
Returns The Selected Stored Name.
Definition at line 61 of file HK_Storage.cpp.
int HK_Storage::GetNumber | ( | int | Select | ) |
Returns The Selected Stored Number.
Definition at line 96 of file HK_Storage.cpp.
string HK_Storage::GetText | ( | int | Select | ) |
Returns The Selected Stored Text.
Definition at line 91 of file HK_Storage.cpp.
int HK_Storage::GetValidID | ( | ) |
Returns A Valid ID For Adding Entries To The Database.
Definition at line 106 of file HK_Storage.cpp.
int HK_Storage::GetYear | ( | int | Select | ) |
Returns The Selected Year From The Stored Date.
Definition at line 86 of file HK_Storage.cpp.
bool HK_Storage::IsValidName | ( | string | Name | ) |
Returns True If Name Isn't Already In Use.
Definition at line 128 of file HK_Storage.cpp.
HK_KeyValue HK_Storage::Search | ( | string | Prefix, |
string | Value | ||
) |
Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found.
Definition at line 138 of file HK_Storage.cpp.
void HK_Storage::SetDate | ( | int | Select, |
HK_Date | Date | ||
) |
Sets The Selected Stored Date.
Definition at line 182 of file HK_Storage.cpp.
void HK_Storage::SetDay | ( | int | Select, |
int | Days | ||
) |
Sets The Selected Day From The Stored Date.
Definition at line 187 of file HK_Storage.cpp.
void HK_Storage::SetID | ( | int | Select, |
int | ID | ||
) |
Sets The Selected Stored ID.
Definition at line 177 of file HK_Storage.cpp.
void HK_Storage::SetMonth | ( | int | Select, |
int | Month | ||
) |
Sets The Selected Month From The Stored Date.
Definition at line 192 of file HK_Storage.cpp.
void HK_Storage::SetName | ( | int | Select, |
string | Name | ||
) |
Sets The Selected Stored Name.
Definition at line 172 of file HK_Storage.cpp.
void HK_Storage::SetNumber | ( | int | Select, |
int | Number | ||
) |
Sets The Selected Stored Number.
Definition at line 207 of file HK_Storage.cpp.
void HK_Storage::SetText | ( | int | Select, |
string | Text | ||
) |
Sets The Selected Stored Text.
Definition at line 202 of file HK_Storage.cpp.
void HK_Storage::SetYear | ( | int | Select, |
int | Year | ||
) |
Sets The Selected Year From The Stored Date.
Definition at line 197 of file HK_Storage.cpp.