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

Holds Data For One Batch, Includes Basic Set/Get Methods. More...

#include <Batch.h>

Public Member Functions

 HK_Batch ()
 Default Constructor. More...
 
 HK_Batch (int ID, string Name, string Type, string Breed, string Group, string Comments, string Incubator, int Eggs, int Fertile, int Chicks, HK_Date Start, HK_Date Candle, HK_Date Lockdown, HK_Date Hatch, int Remind, int Adv)
 OverLoaded Sets The Entire Batch. More...
 
 ~HK_Batch ()
 Destructor. More...
 
int GetID ()
 Returns Batch ID. More...
 
string GetName ()
 Returns Batch Name. More...
 
string GetType ()
 Returns Batch Type. More...
 
string GetBreed ()
 Returns Batch Breed. More...
 
string GetGroup ()
 Returns Batch Group. More...
 
string GetComments ()
 Returns Batch Comments. More...
 
string GetIncubator ()
 Returns The Incubator As A String. More...
 
int GetEggs ()
 Returns Number Of Eggs In Batch. More...
 
int GetFertile ()
 Returns Number Of Fertile Eggs In Batch, If Advanced Is Enabled It Returns HK_Advanced::GetFertile() More...
 
int GetChicks ()
 Returns Number Of Hatched Eggs In Batch, If Advanced Is Enabled It Returns HK_Advanced::GetChicks() More...
 
HK_Date GetStart ()
 Returns Batch Start Date. More...
 
HK_Date GetCandle ()
 Returns Batch Candle Date. More...
 
HK_Date GetLockdown ()
 Returns Batch Lockdown Date. More...
 
HK_Date GetHatch ()
 Returns Batch Hatch Date. More...
 
int GetRemind ()
 Returns Batch Remind Status. More...
 
int GetAdv ()
 Returns Batch Advanced Status. More...
 
HK_Advanced GetAdvanced ()
 Returns Batch Advanced Egg Data. More...
 
vector< string > GetSQL ()
 Returns An SQL String To Set Batch In Database. More...
 
vector< string > GetSQL (int ID)
 Overloaded, Uses The Supplied ID Instead If HK_BatchID. More...
 
vector< string > GetUpdate ()
 Returns A String That Updates This Batch In Database. More...
 
int GetDaysLeft ()
 Returns The Number Of Days Left In Incubation Period. More...
 
int OnDay ()
 Returns The Number Of Days Left In Incubation Period. More...
 
HK_KeyValue Search (string Value, bool SearchBatches, bool SearchAdv)
 Searches For Value And Returns HK_KeyValue With Data. More...
 
void Set (int ID, string Name, string Type, string Breed, string Group, string Comments, string Incubator, int Eggs, int Fertile, int Chicks, HK_Date Start, HK_Date Candle, HK_Date Lockdown, HK_Date Hatch, int Remind, int Adv)
 Sets All Batch Data In One Function. More...
 
void SetID (int ID)
 Sets Batch ID. More...
 
void SetName (string Name)
 Sets Batch Name. More...
 
void SetType (string Type)
 Sets Batch Type. More...
 
void SetBreed (string Breed)
 Sets Batch Breed. More...
 
void SetGroup (string Group)
 Sets Batch Group. More...
 
void SetComments (string Comments)
 Sets Batch Comments. More...
 
void SetIncubator (string Incubator)
 Sets Batch Incubator. More...
 
void SetEggs (int Eggs)
 Sets Batch Eggs. More...
 
void SetFertile (int Fertile)
 Sets Batch Fertile Eggs. More...
 
void SetChicks (int Chicks)
 Sets Batch Hatched Eggs. More...
 
void SetStart (HK_Date Start)
 Sets Batch Start Date. More...
 
void SetCandle (HK_Date Candle)
 Sets Batch Candle Date. More...
 
void SetLockdown (HK_Date Lockdown)
 Sets Batch Lockdown Date. More...
 
void SetHatch (HK_Date Hatch)
 Sets Batch Hatch Date. More...
 
void SetRemind (int Remind)
 Sets Batch Remind Status For Notifications. More...
 
void SetAdv (int Adv)
 Sets Batch Advanced Status. More...
 
void SetAdvanced (HK_Advanced Adv)
 Sets Batch Advanced Data. More...
 
void SetAdvEgg (HK_Egg Egg, int Select)
 Sets The Selected Egg For HK_Advanced. More...
 
void SetAdvUpdate (bool Status)
 Sets The Update Status HK_Advanced. More...
 
int CalculatePercent (int First, int Second)
 Returns The Percentage Of Two Ints. More...
 
int PercentFertile ()
 Returns The Percentage Of Eggs That Were Fertile. More...
 
int PercentOfFertile ()
 Returns The Percentage Of Fertile Eggs That Hatched. More...
 
int PercentOfTotal ()
 Returns The Percentage Of Total Eggs That Hatched. More...
 
int FertileUnhatched ()
 Returns The Number Of Fertile Eggs That Didn't Hatch. More...
 
int PercentOfTotalUnhatched ()
 Returns The Percentage Of Total Eggs That Didn't Hatch. More...
 

Private Attributes

int HK_BatchID
 
string HK_BatchName
 
string HK_BatchType
 
string HK_BatchBreed
 
string HK_BatchGroup
 
string HK_BatchComments
 
string HK_BatchIncubator
 
int HK_BatchEggs
 
int HK_BatchFertile
 
int HK_BatchChicks
 
HK_Date HK_BatchStart
 
HK_Date HK_BatchCandle
 
HK_Date HK_BatchLockdown
 
HK_Date HK_BatchHatch
 
int HK_BatchRemind
 
int HK_BatchAdv
 
HK_Advanced HK_BatchAdvanced
 

Detailed Description

Holds Data For One Batch, Includes Basic Set/Get Methods.

Since
01/29/2020
See also
HK_Batches

Definition at line 22 of file Batch.h.

Constructor & Destructor Documentation

◆ HK_Batch() [1/2]

HK_Batch::HK_Batch ( )

Default Constructor.

Definition at line 11 of file HK_Batch.cpp.

◆ HK_Batch() [2/2]

HK_Batch::HK_Batch ( int  ID,
string  Name,
string  Type,
string  Breed,
string  Group,
string  Comments,
string  Incubator,
int  Eggs,
int  Fertile,
int  Chicks,
HK_Date  Start,
HK_Date  Candle,
HK_Date  Lockdown,
HK_Date  Hatch,
int  Remind,
int  Adv 
)

OverLoaded Sets The Entire Batch.

Definition at line 14 of file HK_Batch.cpp.

◆ ~HK_Batch()

HK_Batch::~HK_Batch ( )

Destructor.

Definition at line 25 of file HK_Batch.cpp.

Member Function Documentation

◆ CalculatePercent()

int HK_Batch::CalculatePercent ( int  First,
int  Second 
)

Returns The Percentage Of Two Ints.

Definition at line 241 of file HK_Batch.cpp.

◆ FertileUnhatched()

int HK_Batch::FertileUnhatched ( )

Returns The Number Of Fertile Eggs That Didn't Hatch.

Definition at line 296 of file HK_Batch.cpp.

◆ GetAdv()

int HK_Batch::GetAdv ( )

Returns Batch Advanced Status.

Definition at line 185 of file HK_Batch.cpp.

◆ GetAdvanced()

HK_Advanced HK_Batch::GetAdvanced ( )

Returns Batch Advanced Egg Data.

Definition at line 187 of file HK_Batch.cpp.

◆ GetBreed()

string HK_Batch::GetBreed ( )

Returns Batch Breed.

Definition at line 146 of file HK_Batch.cpp.

◆ GetCandle()

HK_Date HK_Batch::GetCandle ( )

Returns Batch Candle Date.

Definition at line 177 of file HK_Batch.cpp.

◆ GetChicks()

int HK_Batch::GetChicks ( )

Returns Number Of Hatched Eggs In Batch, If Advanced Is Enabled It Returns HK_Advanced::GetChicks()

Definition at line 166 of file HK_Batch.cpp.

◆ GetComments()

string HK_Batch::GetComments ( )

Returns Batch Comments.

Definition at line 150 of file HK_Batch.cpp.

◆ GetDaysLeft()

int HK_Batch::GetDaysLeft ( )

Returns The Number Of Days Left In Incubation Period.

Definition at line 254 of file HK_Batch.cpp.

◆ GetEggs()

int HK_Batch::GetEggs ( )

Returns Number Of Eggs In Batch.

Definition at line 154 of file HK_Batch.cpp.

◆ GetFertile()

int HK_Batch::GetFertile ( )

Returns Number Of Fertile Eggs In Batch, If Advanced Is Enabled It Returns HK_Advanced::GetFertile()

Definition at line 157 of file HK_Batch.cpp.

◆ GetGroup()

string HK_Batch::GetGroup ( )

Returns Batch Group.

Definition at line 148 of file HK_Batch.cpp.

◆ GetHatch()

HK_Date HK_Batch::GetHatch ( )

Returns Batch Hatch Date.

Definition at line 181 of file HK_Batch.cpp.

◆ GetID()

int HK_Batch::GetID ( )

Returns Batch ID.

Definition at line 140 of file HK_Batch.cpp.

◆ GetIncubator()

string HK_Batch::GetIncubator ( )

Returns The Incubator As A String.

Definition at line 152 of file HK_Batch.cpp.

◆ GetLockdown()

HK_Date HK_Batch::GetLockdown ( )

Returns Batch Lockdown Date.

Definition at line 179 of file HK_Batch.cpp.

◆ GetName()

string HK_Batch::GetName ( )

Returns Batch Name.

Definition at line 142 of file HK_Batch.cpp.

◆ GetRemind()

int HK_Batch::GetRemind ( )

Returns Batch Remind Status.

Definition at line 183 of file HK_Batch.cpp.

◆ GetSQL() [1/2]

vector< string > HK_Batch::GetSQL ( )

Returns An SQL String To Set Batch In Database.

Definition at line 190 of file HK_Batch.cpp.

◆ GetSQL() [2/2]

vector< string > HK_Batch::GetSQL ( int  ID)

Overloaded, Uses The Supplied ID Instead If HK_BatchID.

Definition at line 193 of file HK_Batch.cpp.

◆ GetStart()

HK_Date HK_Batch::GetStart ( )

Returns Batch Start Date.

Definition at line 175 of file HK_Batch.cpp.

◆ GetType()

string HK_Batch::GetType ( )

Returns Batch Type.

Definition at line 144 of file HK_Batch.cpp.

◆ GetUpdate()

vector< string > HK_Batch::GetUpdate ( )

Returns A String That Updates This Batch In Database.

Definition at line 210 of file HK_Batch.cpp.

◆ OnDay()

int HK_Batch::OnDay ( )

Returns The Number Of Days Left In Incubation Period.

Definition at line 266 of file HK_Batch.cpp.

◆ PercentFertile()

int HK_Batch::PercentFertile ( )

Returns The Percentage Of Eggs That Were Fertile.

Definition at line 278 of file HK_Batch.cpp.

◆ PercentOfFertile()

int HK_Batch::PercentOfFertile ( )

Returns The Percentage Of Fertile Eggs That Hatched.

Definition at line 284 of file HK_Batch.cpp.

◆ PercentOfTotal()

int HK_Batch::PercentOfTotal ( )

Returns The Percentage Of Total Eggs That Hatched.

Definition at line 290 of file HK_Batch.cpp.

◆ PercentOfTotalUnhatched()

int HK_Batch::PercentOfTotalUnhatched ( )

Returns The Percentage Of Total Eggs That Didn't Hatch.

Definition at line 302 of file HK_Batch.cpp.

◆ Search()

HK_KeyValue HK_Batch::Search ( string  Value,
bool  SearchBatches,
bool  SearchAdv 
)

Searches For Value And Returns HK_KeyValue With Data.

Definition at line 28 of file HK_Batch.cpp.

◆ Set()

void HK_Batch::Set ( int  ID,
string  Name,
string  Type,
string  Breed,
string  Group,
string  Comments,
string  Incubator,
int  Eggs,
int  Fertile,
int  Chicks,
HK_Date  Start,
HK_Date  Candle,
HK_Date  Lockdown,
HK_Date  Hatch,
int  Remind,
int  Adv 
)

Sets All Batch Data In One Function.

Definition at line 75 of file HK_Batch.cpp.

◆ SetAdv()

void HK_Batch::SetAdv ( int  Adv)

Sets Batch Advanced Status.

Definition at line 130 of file HK_Batch.cpp.

◆ SetAdvanced()

void HK_Batch::SetAdvanced ( HK_Advanced  Adv)

Sets Batch Advanced Data.

Definition at line 132 of file HK_Batch.cpp.

◆ SetAdvEgg()

void HK_Batch::SetAdvEgg ( HK_Egg  Egg,
int  Select 
)

Sets The Selected Egg For HK_Advanced.

Definition at line 134 of file HK_Batch.cpp.

◆ SetAdvUpdate()

void HK_Batch::SetAdvUpdate ( bool  Status)

Sets The Update Status HK_Advanced.

Definition at line 136 of file HK_Batch.cpp.

◆ SetBreed()

void HK_Batch::SetBreed ( string  Breed)

Sets Batch Breed.

Definition at line 106 of file HK_Batch.cpp.

◆ SetCandle()

void HK_Batch::SetCandle ( HK_Date  Candle)

Sets Batch Candle Date.

Definition at line 122 of file HK_Batch.cpp.

◆ SetChicks()

void HK_Batch::SetChicks ( int  Chicks)

Sets Batch Hatched Eggs.

Definition at line 118 of file HK_Batch.cpp.

◆ SetComments()

void HK_Batch::SetComments ( string  Comments)

Sets Batch Comments.

Definition at line 110 of file HK_Batch.cpp.

◆ SetEggs()

void HK_Batch::SetEggs ( int  Eggs)

Sets Batch Eggs.

Definition at line 114 of file HK_Batch.cpp.

◆ SetFertile()

void HK_Batch::SetFertile ( int  Fertile)

Sets Batch Fertile Eggs.

Definition at line 116 of file HK_Batch.cpp.

◆ SetGroup()

void HK_Batch::SetGroup ( string  Group)

Sets Batch Group.

Definition at line 108 of file HK_Batch.cpp.

◆ SetHatch()

void HK_Batch::SetHatch ( HK_Date  Hatch)

Sets Batch Hatch Date.

Definition at line 126 of file HK_Batch.cpp.

◆ SetID()

void HK_Batch::SetID ( int  ID)

Sets Batch ID.

Definition at line 100 of file HK_Batch.cpp.

◆ SetIncubator()

void HK_Batch::SetIncubator ( string  Incubator)

Sets Batch Incubator.

Definition at line 112 of file HK_Batch.cpp.

◆ SetLockdown()

void HK_Batch::SetLockdown ( HK_Date  Lockdown)

Sets Batch Lockdown Date.

Definition at line 124 of file HK_Batch.cpp.

◆ SetName()

void HK_Batch::SetName ( string  Name)

Sets Batch Name.

Definition at line 102 of file HK_Batch.cpp.

◆ SetRemind()

void HK_Batch::SetRemind ( int  Remind)

Sets Batch Remind Status For Notifications.

Definition at line 128 of file HK_Batch.cpp.

◆ SetStart()

void HK_Batch::SetStart ( HK_Date  Start)

Sets Batch Start Date.

Definition at line 120 of file HK_Batch.cpp.

◆ SetType()

void HK_Batch::SetType ( string  Type)

Sets Batch Type.

Definition at line 104 of file HK_Batch.cpp.

Member Data Documentation

◆ HK_BatchAdv

int HK_Batch::HK_BatchAdv
private

Definition at line 42 of file Batch.h.

◆ HK_BatchAdvanced

HK_Advanced HK_Batch::HK_BatchAdvanced
private

Definition at line 43 of file Batch.h.

◆ HK_BatchBreed

string HK_Batch::HK_BatchBreed
private

Definition at line 27 of file Batch.h.

◆ HK_BatchCandle

HK_Date HK_Batch::HK_BatchCandle
private

Definition at line 37 of file Batch.h.

◆ HK_BatchChicks

int HK_Batch::HK_BatchChicks
private

Definition at line 34 of file Batch.h.

◆ HK_BatchComments

string HK_Batch::HK_BatchComments
private

Definition at line 29 of file Batch.h.

◆ HK_BatchEggs

int HK_Batch::HK_BatchEggs
private

Definition at line 32 of file Batch.h.

◆ HK_BatchFertile

int HK_Batch::HK_BatchFertile
private

Definition at line 33 of file Batch.h.

◆ HK_BatchGroup

string HK_Batch::HK_BatchGroup
private

Definition at line 28 of file Batch.h.

◆ HK_BatchHatch

HK_Date HK_Batch::HK_BatchHatch
private

Definition at line 39 of file Batch.h.

◆ HK_BatchID

int HK_Batch::HK_BatchID
private

Definition at line 24 of file Batch.h.

◆ HK_BatchIncubator

string HK_Batch::HK_BatchIncubator
private

Definition at line 30 of file Batch.h.

◆ HK_BatchLockdown

HK_Date HK_Batch::HK_BatchLockdown
private

Definition at line 38 of file Batch.h.

◆ HK_BatchName

string HK_Batch::HK_BatchName
private

Definition at line 25 of file Batch.h.

◆ HK_BatchRemind

int HK_Batch::HK_BatchRemind
private

Definition at line 41 of file Batch.h.

◆ HK_BatchStart

HK_Date HK_Batch::HK_BatchStart
private

Definition at line 36 of file Batch.h.

◆ HK_BatchType

string HK_Batch::HK_BatchType
private

Definition at line 26 of file Batch.h.


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