HatchKeeper  0.90
The Free Open-Source Egg Incubation Software
Advanced.h
Go to the documentation of this file.
1 /*******************************************************************/
8 #ifndef _ADVANCED_H__
9 #define _ADVANCED_H__
10 
11 #include "../headers/Egg.h"
12 #include <vector>
21  private:
22  int HK_AdvID;
25  vector<HK_Egg> HK_AdvEggs;
26 
27  bool HK_AdvUpdate = false;
28  public:
29  HK_Advanced();
30 
31  void AddEgg(HK_Egg Egg);
32 
33  int CalcAvgLoss();
34  void Clear();
35 
36  int GetChicks();
37  int GetDays();
38  vector<HK_Egg> GetEggs();
39  HK_Egg GetEgg(int Select);
40  int GetEggCount();
41  int GetFertile();
42  int GetID();
43  string GetSQL();
44  vector<string> GetUpdate();
45  int GetUnit();
46  bool GetUpdateStatus();
47 
48  HK_KeyValue Search(string Value, string BatchName);
49  void Set(int ID, int Unit, int Days, vector<HK_Egg> Eggs);
50  void SetID(int ID);
51  void SetUnit(int Unit);
52  void SetDays(int Days);
53  void SetEgg(HK_Egg Egg, int Select);
54  void SetEggs(vector<HK_Egg> Eggs);
55  void SetUpdate(bool Status);
56 };
57 
58 #endif
A Class For Managing Multiple HK_Egg Instances.
Definition: Advanced.h:20
HK_Egg GetEgg(int Select)
Returns The Selected Egg.
Definition: HK_Advanced.cpp:50
int GetEggCount()
Returns The Number Of Eggs.
Definition: HK_Advanced.cpp:52
void SetEggs(vector< HK_Egg > Eggs)
Sets All Eggs At Once.
vector< HK_Egg > HK_AdvEggs
Definition: Advanced.h:25
void SetUpdate(bool Status)
Sets Update Status For This HK_Advanced.
HK_KeyValue Search(string Value, string BatchName)
Searches Eggs For Matches To Value.
vector< string > GetUpdate()
Returns An Array Of SQL Strings To Update Database.
void AddEgg(HK_Egg Egg)
Adds An HK_Egg To HK_AdvEggs Vector.
Definition: HK_Advanced.cpp:40
string GetSQL()
Definition: HK_Advanced.cpp:78
bool HK_AdvUpdate
Definition: Advanced.h:27
int GetChicks()
Returns The Number Of Eggs That Hatched Based On HK_Egg Data.
Definition: HK_Advanced.cpp:65
int GetDays()
Returns Incubation Days.
Definition: HK_Advanced.cpp:46
int HK_AdvDays
Definition: Advanced.h:24
void SetID(int ID)
Sets ID.
HK_Advanced()
Default Constructor.
Definition: HK_Advanced.cpp:11
int CalcAvgLoss()
Returns The Average Weight Loss For All Eggs In Batch.
Definition: HK_Advanced.cpp:14
void Clear()
Clears All Data From This Object.
Definition: HK_Advanced.cpp:28
int HK_AdvID
Definition: Advanced.h:22
void SetEgg(HK_Egg Egg, int Select)
Sets Selected Egg.
int HK_AdvUnit
Definition: Advanced.h:23
int GetFertile()
Returns The Number Of Eggs That Are Fertile Based On HK_Egg Data.
Definition: HK_Advanced.cpp:55
void SetUnit(int Unit)
Sets Weight Unit Used.
void SetDays(int Days)
Sets Incubation Days.
int GetUnit()
Returns Weight Unit.
Definition: HK_Advanced.cpp:44
bool GetUpdateStatus()
Returns True If This HK_Advanced Has Data That Needs To Be Updated.
int GetID()
Returns ID.
Definition: HK_Advanced.cpp:42
void Set(int ID, int Unit, int Days, vector< HK_Egg > Eggs)
Initialize In One Function Call.
vector< HK_Egg > GetEggs()
Returns An Array Of HK_Egg Objects.
Definition: HK_Advanced.cpp:48
A Class For Storing And Retieving Data For One Egg.
Definition: Egg.h:24
A Key and Value Type Storage.
Definition: KeyValue.h:25