HatchKeeper  0.90
The Free Open-Source Egg Incubation Software
HK_Storage Class Reference

A Class For Storing Values. More...

#include <Storage.h>

Inheritance diagram for HK_Storage:
HK_Notifications

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_DateHK_StoreDate
 
vector< string > HK_StoreText
 
vector< int > HK_StoreNumber
 

Detailed Description

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.

Since
01/27/2020

Definition at line 26 of file Storage.h.

Constructor & Destructor Documentation

◆ HK_Storage()

HK_Storage::HK_Storage ( )

Constructor.

Definition at line 12 of file HK_Storage.cpp.

Member Function Documentation

◆ Add() [1/6]

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.

◆ Add() [2/6]

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.

◆ Add() [3/6]

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.

◆ Add() [4/6]

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.

◆ Add() [5/6]

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.

◆ Add() [6/6]

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.

◆ Clear()

void HK_Storage::Clear ( )

Clears All Data And Shrinks The Arrays.

Definition at line 212 of file HK_Storage.cpp.

◆ GetCount()

int HK_Storage::GetCount ( )

Returns The Number Of Elements Stored.

Definition at line 101 of file HK_Storage.cpp.

◆ GetDate()

HK_Date HK_Storage::GetDate ( int  Select)

Returns The Selected Stored Date.

Definition at line 71 of file HK_Storage.cpp.

◆ GetDay()

int HK_Storage::GetDay ( int  Select)

Returns The Selected Day From The Stored Date.

Definition at line 76 of file HK_Storage.cpp.

◆ GetID()

int HK_Storage::GetID ( int  Select)

Returns The Selected Stored ID.

Definition at line 66 of file HK_Storage.cpp.

◆ GetMonth()

int HK_Storage::GetMonth ( int  Select)

Returns The Selected Month From The Stored Date.

Definition at line 81 of file HK_Storage.cpp.

◆ GetName()

string HK_Storage::GetName ( int  Select)

Returns The Selected Stored Name.

Definition at line 61 of file HK_Storage.cpp.

◆ GetNumber()

int HK_Storage::GetNumber ( int  Select)

Returns The Selected Stored Number.

Definition at line 96 of file HK_Storage.cpp.

◆ GetText()

string HK_Storage::GetText ( int  Select)

Returns The Selected Stored Text.

Definition at line 91 of file HK_Storage.cpp.

◆ GetValidID()

int HK_Storage::GetValidID ( )

Returns A Valid ID For Adding Entries To The Database.

Definition at line 106 of file HK_Storage.cpp.

◆ GetYear()

int HK_Storage::GetYear ( int  Select)

Returns The Selected Year From The Stored Date.

Definition at line 86 of file HK_Storage.cpp.

◆ IsValidName()

bool HK_Storage::IsValidName ( string  Name)

Returns True If Name Isn't Already In Use.

Definition at line 128 of file HK_Storage.cpp.

◆ Search()

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.

◆ SetDate()

void HK_Storage::SetDate ( int  Select,
HK_Date  Date 
)

Sets The Selected Stored Date.

Definition at line 182 of file HK_Storage.cpp.

◆ SetDay()

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.

◆ SetID()

void HK_Storage::SetID ( int  Select,
int  ID 
)

Sets The Selected Stored ID.

Definition at line 177 of file HK_Storage.cpp.

◆ SetMonth()

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.

◆ SetName()

void HK_Storage::SetName ( int  Select,
string  Name 
)

Sets The Selected Stored Name.

Definition at line 172 of file HK_Storage.cpp.

◆ SetNumber()

void HK_Storage::SetNumber ( int  Select,
int  Number 
)

Sets The Selected Stored Number.

Definition at line 207 of file HK_Storage.cpp.

◆ SetText()

void HK_Storage::SetText ( int  Select,
string  Text 
)

Sets The Selected Stored Text.

Definition at line 202 of file HK_Storage.cpp.

◆ SetYear()

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.

Member Data Documentation

◆ HK_StoreDate

vector<HK_Date> HK_Storage::HK_StoreDate
private

Definition at line 30 of file Storage.h.

◆ HK_StoreID

vector<int> HK_Storage::HK_StoreID
private

Definition at line 29 of file Storage.h.

◆ HK_StoreName

vector<string> HK_Storage::HK_StoreName
private

Definition at line 28 of file Storage.h.

◆ HK_StoreNumber

vector<int> HK_Storage::HK_StoreNumber
private

Definition at line 32 of file Storage.h.

◆ HK_StoreText

vector<string> HK_Storage::HK_StoreText
private

Definition at line 31 of file Storage.h.


The documentation for this class was generated from the following files: