9 #include "../headers/Egg.h"
31 for(
int A = (Day-1); A >= 0; A--)
41 for(
int A = (
GetDays() - 1); A > 0; A--)
82 transform(Value.begin(),Value.end(),Value.begin(), ::tolower);
83 transform(Tag1.begin(),Tag1.end(),Tag1.begin(), ::tolower);
84 transform(Tag2.begin(),Tag2.end(),Tag2.begin(), ::tolower);
85 transform(Tag3.begin(),Tag3.end(),Tag3.begin(), ::tolower);
86 transform(Comments.begin(),Comments.end(),Comments.begin(), ::tolower);
88 if(Tag1.find(Value) != string::npos)
89 Results.
Add(
"Batch " + BatchName +
"'s Egg " + to_string(Egg) +
", Tag 1",
HK_Tag1);
91 if(Tag2.find(Value) != string::npos)
92 Results.
Add(
"Batch " + BatchName +
"'s Egg " + to_string(Egg) +
", Tag 2",
HK_Tag2);
94 if(Tag3.find(Value) != string::npos)
95 Results.
Add(
"Batch " + BatchName +
"'s Egg " + to_string(Egg) +
", Tag 3",
HK_Tag3);
97 if(Comments.find(Value) != string::npos)
98 Results.
Add(
"Batch " + BatchName +
"'s Egg " + to_string(Egg) +
", Comments",
HK_Comments);
100 for(
int A = 0; A <
GetDays(); A++) {
102 transform(DayCom.begin(),DayCom.end(),DayCom.begin(), ::tolower);
104 if(DayCom.find(Value) != string::npos)
105 Results.
Add(
"Batch " + BatchName +
"'s Egg " + to_string(Egg) +
", Day " + to_string(A + 1) +
", Comments",
HK_DayComment[A]);
120 vector<HK_Weight> DayWeight,
121 vector<string> DayComments
A Class For Managing Dates.
int GetResult()
Returns -1 If No Result, 0 If Hatched, And 2 If Egg Quit.
string GetComments()
Returns Egg Comments.
HK_Date HK_ResultDate
Holds Result Date.
int CalcDayLoss(int Day)
Returns The Percentage Of Weight Lost From Previous Weighing.
void SetDayWeight(vector< HK_Weight > Weight)
Sets Weight For All Days.
int HK_Fertile
0 == Unfertile, 1 == Fertile
void SetDate(HK_Date Date)
Sets Result Date.
string HK_Comments
Holds Comments For Egg.
int HK_Result
-1 == No Result, 0 == Quit, 1 == Hatched
void SetComments(string Comments)
Sets Egg Comments.
int GetDays()
Returns The Number Of Days For This Egg.
string GetTag2()
Returns Tag 2 As A String.
void Set(string Tag1, string Tag2, string Tag3, int Fertile, int Pipped, int Result, HK_Date Date, string Comments, vector< HK_Weight > DayWeight, vector< string > DayComments)
Sets All Data In One Function.
int CalcTotalLoss()
Returns The Total Percentage Of Weight Lost By This Egg.
vector< string > HK_DayComment
Holds 1 Comment per day.
void SetResult(int Result)
Sets Result Status.
string HK_Tag3
Holds Tag 3 For Egg.
HK_Date GetDate()
Returns The Date For The Result.
string GetTag3()
Returns Tag 3 As A String.
vector< HK_Weight > HK_DayWeight
Holds 1 weight per day.
string HK_Tag1
Holds Tag 1 For Egg.
void SetTag3(string Tag)
Sets The Third Tag.
void SetTag1(string Tag)
Sets The First Tag.
HK_Egg()
Default Constructor.
void SetFertile(int Fertile)
Sets Fertile Status.
vector< string > GetDayComments()
Returns An Array Containing A Comment For Every Day.
string HK_Tag2
Holds Tag 2 For Egg.
void ClearDayData()
Clears And Shrinks The Day Data Arrays.
void AddDayWeight(HK_Weight Weight)
Adds Weight For Another Day.
void AddDayComments(string Comments)
Adds Comments For Another Day.
vector< HK_Weight > GetDayWeight()
Returns An Array Containing A Weight For Every Day.
void SetPipped(int Pipped)
Sets Pip Status.
void SetTag2(string Tag)
Sets The Second Tag.
int GetPipped()
Returns 0 If Egg Is Not Pipped And 1 If It Is.
string GetTag1()
Returns Tag 1 As A String.
HK_KeyValue Search(string Value, string BatchName, int Egg)
Searches This Egg For Matches To Value.
int GetFertile()
Returns 0 If Egg Is Not Fertile And 1 If It Is.
void SetDayComments(vector< string > Comments)
Sets Comments For All Days.
int HK_Pipped
0 == Unpipped, 1 == Pipped
A Key and Value Type Storage.
void Add(string Key, string Value)
Adds A Key And Value;.
A Class For Managing Data For One Weight.