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

A Class For Storing And Retieving Data For One Egg. More...

#include <Egg.h>

Public Member Functions

 HK_Egg ()
 Default Constructor. More...
 
void ClearDayData ()
 Clears And Shrinks The Day Data Arrays. More...
 
int CalcDayLoss (int Day)
 Returns The Percentage Of Weight Lost From Previous Weighing. More...
 
int CalcTotalLoss ()
 Returns The Total Percentage Of Weight Lost By This Egg. More...
 
string GetTag1 ()
 Returns Tag 1 As A String. More...
 
string GetTag2 ()
 Returns Tag 2 As A String. More...
 
string GetTag3 ()
 Returns Tag 3 As A String. More...
 
int GetFertile ()
 Returns 0 If Egg Is Not Fertile And 1 If It Is. More...
 
int GetPipped ()
 Returns 0 If Egg Is Not Pipped And 1 If It Is. More...
 
int GetResult ()
 Returns -1 If No Result, 0 If Hatched, And 2 If Egg Quit. More...
 
HK_Date GetDate ()
 Returns The Date For The Result. More...
 
int GetDays ()
 Returns The Number Of Days For This Egg. More...
 
string GetComments ()
 Returns Egg Comments. More...
 
vector< HK_WeightGetDayWeight ()
 Returns An Array Containing A Weight For Every Day. More...
 
vector< string > GetDayComments ()
 Returns An Array Containing A Comment For Every Day. More...
 
HK_KeyValue Search (string Value, string BatchName, int Egg)
 Searches This Egg For Matches To Value. More...
 
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. More...
 
void SetTag1 (string Tag)
 Sets The First Tag. More...
 
void SetTag2 (string Tag)
 Sets The Second Tag. More...
 
void SetTag3 (string Tag)
 Sets The Third Tag. More...
 
void SetFertile (int Fertile)
 Sets Fertile Status. More...
 
void SetPipped (int Pipped)
 Sets Pip Status. More...
 
void SetResult (int Result)
 Sets Result Status. More...
 
void SetDate (HK_Date Date)
 Sets Result Date. More...
 
void SetComments (string Comments)
 Sets Egg Comments. More...
 
void SetDayWeight (vector< HK_Weight > Weight)
 Sets Weight For All Days. More...
 
void AddDayWeight (HK_Weight Weight)
 Adds Weight For Another Day. More...
 
void SetDayComments (vector< string > Comments)
 Sets Comments For All Days. More...
 
void AddDayComments (string Comments)
 Adds Comments For Another Day. More...
 

Private Attributes

string HK_Tag1
 Holds Tag 1 For Egg. More...
 
string HK_Tag2
 Holds Tag 2 For Egg. More...
 
string HK_Tag3
 Holds Tag 3 For Egg. More...
 
int HK_Fertile
 0 == Unfertile, 1 == Fertile More...
 
int HK_Pipped
 0 == Unpipped, 1 == Pipped More...
 
int HK_Result
 -1 == No Result, 0 == Quit, 1 == Hatched More...
 
HK_Date HK_ResultDate
 Holds Result Date. More...
 
string HK_Comments
 Holds Comments For Egg. More...
 
vector< HK_WeightHK_DayWeight
 Holds 1 weight per day. More...
 
vector< string > HK_DayComment
 Holds 1 Comment per day. More...
 

Detailed Description

A Class For Storing And Retieving Data For One Egg.

Since
02/09/2020

Definition at line 24 of file Egg.h.

Constructor & Destructor Documentation

◆ HK_Egg()

HK_Egg::HK_Egg ( )

Default Constructor.

Definition at line 12 of file HK_Egg.cpp.

Member Function Documentation

◆ AddDayComments()

void HK_Egg::AddDayComments ( string  Comments)

Adds Comments For Another Day.

Definition at line 159 of file HK_Egg.cpp.

◆ AddDayWeight()

void HK_Egg::AddDayWeight ( HK_Weight  Weight)

Adds Weight For Another Day.

Definition at line 155 of file HK_Egg.cpp.

◆ CalcDayLoss()

int HK_Egg::CalcDayLoss ( int  Day)

Returns The Percentage Of Weight Lost From Previous Weighing.

Definition at line 24 of file HK_Egg.cpp.

◆ CalcTotalLoss()

int HK_Egg::CalcTotalLoss ( )

Returns The Total Percentage Of Weight Lost By This Egg.

Definition at line 38 of file HK_Egg.cpp.

◆ ClearDayData()

void HK_Egg::ClearDayData ( )

Clears And Shrinks The Day Data Arrays.

Definition at line 15 of file HK_Egg.cpp.

◆ GetComments()

string HK_Egg::GetComments ( )

Returns Egg Comments.

Definition at line 64 of file HK_Egg.cpp.

◆ GetDate()

HK_Date HK_Egg::GetDate ( )

Returns The Date For The Result.

Definition at line 60 of file HK_Egg.cpp.

◆ GetDayComments()

vector< string > HK_Egg::GetDayComments ( )

Returns An Array Containing A Comment For Every Day.

Definition at line 68 of file HK_Egg.cpp.

◆ GetDays()

int HK_Egg::GetDays ( )

Returns The Number Of Days For This Egg.

Definition at line 62 of file HK_Egg.cpp.

◆ GetDayWeight()

vector< HK_Weight > HK_Egg::GetDayWeight ( )

Returns An Array Containing A Weight For Every Day.

Definition at line 66 of file HK_Egg.cpp.

◆ GetFertile()

int HK_Egg::GetFertile ( )

Returns 0 If Egg Is Not Fertile And 1 If It Is.

Definition at line 54 of file HK_Egg.cpp.

◆ GetPipped()

int HK_Egg::GetPipped ( )

Returns 0 If Egg Is Not Pipped And 1 If It Is.

Definition at line 56 of file HK_Egg.cpp.

◆ GetResult()

int HK_Egg::GetResult ( )

Returns -1 If No Result, 0 If Hatched, And 2 If Egg Quit.

Definition at line 58 of file HK_Egg.cpp.

◆ GetTag1()

string HK_Egg::GetTag1 ( )

Returns Tag 1 As A String.

Definition at line 48 of file HK_Egg.cpp.

◆ GetTag2()

string HK_Egg::GetTag2 ( )

Returns Tag 2 As A String.

Definition at line 50 of file HK_Egg.cpp.

◆ GetTag3()

string HK_Egg::GetTag3 ( )

Returns Tag 3 As A String.

Definition at line 52 of file HK_Egg.cpp.

◆ Search()

HK_KeyValue HK_Egg::Search ( string  Value,
string  BatchName,
int  Egg 
)

Searches This Egg For Matches To Value.

Definition at line 71 of file HK_Egg.cpp.

◆ Set()

void HK_Egg::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.

Definition at line 111 of file HK_Egg.cpp.

◆ SetComments()

void HK_Egg::SetComments ( string  Comments)

Sets Egg Comments.

Definition at line 151 of file HK_Egg.cpp.

◆ SetDate()

void HK_Egg::SetDate ( HK_Date  Date)

Sets Result Date.

Definition at line 149 of file HK_Egg.cpp.

◆ SetDayComments()

void HK_Egg::SetDayComments ( vector< string >  Comments)

Sets Comments For All Days.

Definition at line 157 of file HK_Egg.cpp.

◆ SetDayWeight()

void HK_Egg::SetDayWeight ( vector< HK_Weight Weight)

Sets Weight For All Days.

Definition at line 153 of file HK_Egg.cpp.

◆ SetFertile()

void HK_Egg::SetFertile ( int  Fertile)

Sets Fertile Status.

Definition at line 143 of file HK_Egg.cpp.

◆ SetPipped()

void HK_Egg::SetPipped ( int  Pipped)

Sets Pip Status.

Definition at line 145 of file HK_Egg.cpp.

◆ SetResult()

void HK_Egg::SetResult ( int  Result)

Sets Result Status.

Definition at line 147 of file HK_Egg.cpp.

◆ SetTag1()

void HK_Egg::SetTag1 ( string  Tag)

Sets The First Tag.

Definition at line 137 of file HK_Egg.cpp.

◆ SetTag2()

void HK_Egg::SetTag2 ( string  Tag)

Sets The Second Tag.

Definition at line 139 of file HK_Egg.cpp.

◆ SetTag3()

void HK_Egg::SetTag3 ( string  Tag)

Sets The Third Tag.

Definition at line 141 of file HK_Egg.cpp.

Member Data Documentation

◆ HK_Comments

string HK_Egg::HK_Comments
private

Holds Comments For Egg.

Definition at line 33 of file Egg.h.

◆ HK_DayComment

vector<string> HK_Egg::HK_DayComment
private

Holds 1 Comment per day.

Definition at line 35 of file Egg.h.

◆ HK_DayWeight

vector<HK_Weight> HK_Egg::HK_DayWeight
private

Holds 1 weight per day.

Definition at line 34 of file Egg.h.

◆ HK_Fertile

int HK_Egg::HK_Fertile
private

0 == Unfertile, 1 == Fertile

Definition at line 29 of file Egg.h.

◆ HK_Pipped

int HK_Egg::HK_Pipped
private

0 == Unpipped, 1 == Pipped

Definition at line 30 of file Egg.h.

◆ HK_Result

int HK_Egg::HK_Result
private

-1 == No Result, 0 == Quit, 1 == Hatched

Definition at line 31 of file Egg.h.

◆ HK_ResultDate

HK_Date HK_Egg::HK_ResultDate
private

Holds Result Date.

Definition at line 32 of file Egg.h.

◆ HK_Tag1

string HK_Egg::HK_Tag1
private

Holds Tag 1 For Egg.

Definition at line 26 of file Egg.h.

◆ HK_Tag2

string HK_Egg::HK_Tag2
private

Holds Tag 2 For Egg.

Definition at line 27 of file Egg.h.

◆ HK_Tag3

string HK_Egg::HK_Tag3
private

Holds Tag 3 For Egg.

Definition at line 28 of file Egg.h.


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