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

A Class For Managing Mulitple HK_Batch Objects. More...

#include <Batches.h>

Public Member Functions

 HK_Batches ()
 Default Constructor. More...
 
void Add (HK_Batch Batch)
 Adds Another HK_Batch. More...
 
void Add (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)
 Add Another Batch By Specifying Individual Arguments. More...
 
bool AddAdvanced (HK_Advanced Adv)
 Add Advanced Data To The Batch That Has A Matching ID. More...
 
int AvgFertile ()
 Returns Average Percentage Of Eggs Fertile In This HK_Batches Instance. More...
 
int AvgFertileHatch ()
 Returns Average Percentage Of Fertile Eggs That Hatched In This HK_Batches Instance. More...
 
int AvgTotalHatch ()
 Returns Average Percentage Of Total Eggs That Hatched In This HK_Batches Instance. More...
 
int AvgTotalUnHatch ()
 Returns Average Percentage Of Total Eggs That Did Not Hatch In This HK_Batches Instance. More...
 
void Clear ()
 Clears All Batches. More...
 
int GetAdv (int Select)
 Returns Advanced Status For Selected Batch. More...
 
HK_Advanced GetAdvanced (int Select)
 Returns Advanced Egg Data Selected Batch. More...
 
HK_Batch GetBatch (int Select)
 Returns The Selected Batch. More...
 
string GetBreed (int Select)
 Returns Batch Breed For Selected Batch. More...
 
HK_Date GetCandle (int Select)
 Returns Candle Date For Selected Batch. More...
 
int GetChicks (int Select)
 Returns Number Of Hatched Eggs For Selected Batch. More...
 
string GetComments (int Select)
 Returns Batch Comments For Selected Batch. More...
 
int GetCount ()
 Returns The Number Of Batches Stored. More...
 
int GetEggs (int Select)
 Returns Number Of Eggs For Selected Batch. More...
 
int GetFertile (int Select)
 Returns Number Of Fertile Eggs For Selected Batch. More...
 
string GetGroup (int Select)
 Returns Batch Group For Selected Batch. More...
 
HK_Date GetHatch (int Select)
 Returns Hatch Date For Selected Batch. More...
 
int GetID (int Select)
 Returns Batch ID For Selected Batch. More...
 
string GetIncubator (int Select)
 Returns Batch Incubator For Selected Batch. More...
 
HK_Date GetLockdown (int Select)
 Returns Lockdown Date For Selected Batch. More...
 
string GetName (int Select)
 Returns Batch Name For Selected Batch. More...
 
int GetRemind (int Select)
 Returns Remind Status For Selected Batch. More...
 
vector< string > GetSQL (int Select, int ID)
 Returns SQL String(s) To Set Batch In Database For Selected Batch. More...
 
HK_Date GetStart (int Select)
 Returns Start Date For Selected Batch. More...
 
string GetType (int Select)
 Returns Batch Type For Selected Batch. More...
 
int GetValidID ()
 Returns An ID That Isn't Used By Any HK_Batch In This HK_Batches Instance. More...
 
bool IsDirty (int Select)
 Returns True If Batch Has Dirty Mark Set. More...
 
bool IsValidName (string Name)
 Returns True If Name Isn't Already In Use. More...
 
int PercentFertile (int Select)
 Returns The Percentage Of Egg That Were Fertile For The Selected Batch. More...
 
int PercentOfFertile (int Select)
 Returns The Percentage Of Fertile Eggs That Hatched For The Selected Batch. More...
 
int PercentOfTotal (int Select)
 Returns The Percentage Of Total Eggs That Hatched For The Selected Batch. More...
 
int PercentOfTotalUnhatched (int Select)
 Returns The Percentage Of Total Eggs That Didn't Hatch For The Selected Batch. More...
 
int FertileUnhatched (int Select)
 Returns The Number Of Fertile Eggs That Didn't Hatch For The Selected Batch. More...
 
HK_KeyValue Search (string Value, bool SearchBatch, bool SearchAdv)
 Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found. More...
 
void SetAdvEgg (int Select, HK_Egg Egg, int EggSelect)
 Sets The Selected Egg For HK_Advanced. More...
 
void SetAdvUpdate (int Select, bool Status)
 Sets The Update Status HK_Advanced. More...
 
void SetBatch (int Select, HK_Batch Batch)
 Replaces Batch In Selected Position In Array. Use Add() To Add A Batch. More...
 
void SetClean (int Select)
 Clears Dirty Mark For Selected Batch. More...
 
void SetDirty (int Select)
 Sets Dirty Mark For Selected Batch. More...
 
int TotalEggs ()
 Returns Total Number Of Eggs In This HK_Batches Instance. More...
 
int TotalChicks ()
 Returns Total Number Of Chicks In This HK_Batches Instance. More...
 

Private Attributes

vector< HK_BatchHK_BatchInstance
 
vector< bool > HK_BatchDirty
 

Detailed Description

A Class For Managing Mulitple HK_Batch Objects.

Since
01/29/2020

Definition at line 22 of file Batches.h.

Constructor & Destructor Documentation

◆ HK_Batches()

HK_Batches::HK_Batches ( )

Default Constructor.

Definition at line 12 of file HK_Batches.cpp.

Member Function Documentation

◆ Add() [1/2]

void HK_Batches::Add ( HK_Batch  Batch)

Adds Another HK_Batch.

Definition at line 15 of file HK_Batches.cpp.

◆ Add() [2/2]

void HK_Batches::Add ( 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 
)

Add Another Batch By Specifying Individual Arguments.

Definition at line 21 of file HK_Batches.cpp.

◆ AddAdvanced()

bool HK_Batches::AddAdvanced ( HK_Advanced  Adv)

Add Advanced Data To The Batch That Has A Matching ID.

Returns
True If Matching ID Found.

Definition at line 38 of file HK_Batches.cpp.

◆ AvgFertile()

int HK_Batches::AvgFertile ( )

Returns Average Percentage Of Eggs Fertile In This HK_Batches Instance.

Definition at line 154 of file HK_Batches.cpp.

◆ AvgFertileHatch()

int HK_Batches::AvgFertileHatch ( )

Returns Average Percentage Of Fertile Eggs That Hatched In This HK_Batches Instance.

Definition at line 172 of file HK_Batches.cpp.

◆ AvgTotalHatch()

int HK_Batches::AvgTotalHatch ( )

Returns Average Percentage Of Total Eggs That Hatched In This HK_Batches Instance.

Definition at line 163 of file HK_Batches.cpp.

◆ AvgTotalUnHatch()

int HK_Batches::AvgTotalUnHatch ( )

Returns Average Percentage Of Total Eggs That Did Not Hatch In This HK_Batches Instance.

Definition at line 181 of file HK_Batches.cpp.

◆ Clear()

void HK_Batches::Clear ( )

Clears All Batches.

Definition at line 226 of file HK_Batches.cpp.

◆ FertileUnhatched()

int HK_Batches::FertileUnhatched ( int  Select)

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

Definition at line 123 of file HK_Batches.cpp.

◆ GetAdv()

int HK_Batches::GetAdv ( int  Select)

Returns Advanced Status For Selected Batch.

Definition at line 91 of file HK_Batches.cpp.

◆ GetAdvanced()

HK_Advanced HK_Batches::GetAdvanced ( int  Select)

Returns Advanced Egg Data Selected Batch.

Definition at line 93 of file HK_Batches.cpp.

◆ GetBatch()

HK_Batch HK_Batches::GetBatch ( int  Select)

Returns The Selected Batch.

Definition at line 55 of file HK_Batches.cpp.

◆ GetBreed()

string HK_Batches::GetBreed ( int  Select)

Returns Batch Breed For Selected Batch.

Definition at line 67 of file HK_Batches.cpp.

◆ GetCandle()

HK_Date HK_Batches::GetCandle ( int  Select)

Returns Candle Date For Selected Batch.

Definition at line 83 of file HK_Batches.cpp.

◆ GetChicks()

int HK_Batches::GetChicks ( int  Select)

Returns Number Of Hatched Eggs For Selected Batch.

Definition at line 79 of file HK_Batches.cpp.

◆ GetComments()

string HK_Batches::GetComments ( int  Select)

Returns Batch Comments For Selected Batch.

Definition at line 71 of file HK_Batches.cpp.

◆ GetCount()

int HK_Batches::GetCount ( )

Returns The Number Of Batches Stored.

Definition at line 191 of file HK_Batches.cpp.

◆ GetEggs()

int HK_Batches::GetEggs ( int  Select)

Returns Number Of Eggs For Selected Batch.

Definition at line 75 of file HK_Batches.cpp.

◆ GetFertile()

int HK_Batches::GetFertile ( int  Select)

Returns Number Of Fertile Eggs For Selected Batch.

Definition at line 77 of file HK_Batches.cpp.

◆ GetGroup()

string HK_Batches::GetGroup ( int  Select)

Returns Batch Group For Selected Batch.

Definition at line 69 of file HK_Batches.cpp.

◆ GetHatch()

HK_Date HK_Batches::GetHatch ( int  Select)

Returns Hatch Date For Selected Batch.

Definition at line 87 of file HK_Batches.cpp.

◆ GetID()

int HK_Batches::GetID ( int  Select)

Returns Batch ID For Selected Batch.

Definition at line 61 of file HK_Batches.cpp.

◆ GetIncubator()

string HK_Batches::GetIncubator ( int  Select)

Returns Batch Incubator For Selected Batch.

Definition at line 73 of file HK_Batches.cpp.

◆ GetLockdown()

HK_Date HK_Batches::GetLockdown ( int  Select)

Returns Lockdown Date For Selected Batch.

Definition at line 85 of file HK_Batches.cpp.

◆ GetName()

string HK_Batches::GetName ( int  Select)

Returns Batch Name For Selected Batch.

Definition at line 63 of file HK_Batches.cpp.

◆ GetRemind()

int HK_Batches::GetRemind ( int  Select)

Returns Remind Status For Selected Batch.

Definition at line 89 of file HK_Batches.cpp.

◆ GetSQL()

vector< string > HK_Batches::GetSQL ( int  Select,
int  ID 
)

Returns SQL String(s) To Set Batch In Database For Selected Batch.

Definition at line 96 of file HK_Batches.cpp.

◆ GetStart()

HK_Date HK_Batches::GetStart ( int  Select)

Returns Start Date For Selected Batch.

Definition at line 81 of file HK_Batches.cpp.

◆ GetType()

string HK_Batches::GetType ( int  Select)

Returns Batch Type For Selected Batch.

Definition at line 65 of file HK_Batches.cpp.

◆ GetValidID()

int HK_Batches::GetValidID ( )

Returns An ID That Isn't Used By Any HK_Batch In This HK_Batches Instance.

Definition at line 194 of file HK_Batches.cpp.

◆ IsDirty()

bool HK_Batches::IsDirty ( int  Select)

Returns True If Batch Has Dirty Mark Set.

Definition at line 102 of file HK_Batches.cpp.

◆ IsValidName()

bool HK_Batches::IsValidName ( string  Name)

Returns True If Name Isn't Already In Use.

Definition at line 216 of file HK_Batches.cpp.

◆ PercentFertile()

int HK_Batches::PercentFertile ( int  Select)

Returns The Percentage Of Egg That Were Fertile For The Selected Batch.

Definition at line 105 of file HK_Batches.cpp.

◆ PercentOfFertile()

int HK_Batches::PercentOfFertile ( int  Select)

Returns The Percentage Of Fertile Eggs That Hatched For The Selected Batch.

Definition at line 111 of file HK_Batches.cpp.

◆ PercentOfTotal()

int HK_Batches::PercentOfTotal ( int  Select)

Returns The Percentage Of Total Eggs That Hatched For The Selected Batch.

Definition at line 117 of file HK_Batches.cpp.

◆ PercentOfTotalUnhatched()

int HK_Batches::PercentOfTotalUnhatched ( int  Select)

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

Definition at line 129 of file HK_Batches.cpp.

◆ Search()

HK_KeyValue HK_Batches::Search ( string  Value,
bool  SearchBatch,
bool  SearchAdv 
)

Returned HK_KeyValue's Key Holds Name And Value Holds String Where Match Was Found.

Definition at line 233 of file HK_Batches.cpp.

◆ SetAdvEgg()

void HK_Batches::SetAdvEgg ( int  Select,
HK_Egg  Egg,
int  EggSelect 
)

Sets The Selected Egg For HK_Advanced.

Definition at line 244 of file HK_Batches.cpp.

◆ SetAdvUpdate()

void HK_Batches::SetAdvUpdate ( int  Select,
bool  Status 
)

Sets The Update Status HK_Advanced.

Definition at line 250 of file HK_Batches.cpp.

◆ SetBatch()

void HK_Batches::SetBatch ( int  Select,
HK_Batch  Batch 
)

Replaces Batch In Selected Position In Array. Use Add() To Add A Batch.

See also
Add()

Definition at line 253 of file HK_Batches.cpp.

◆ SetClean()

void HK_Batches::SetClean ( int  Select)

Clears Dirty Mark For Selected Batch.

Definition at line 259 of file HK_Batches.cpp.

◆ SetDirty()

void HK_Batches::SetDirty ( int  Select)

Sets Dirty Mark For Selected Batch.

Definition at line 261 of file HK_Batches.cpp.

◆ TotalChicks()

int HK_Batches::TotalChicks ( )

Returns Total Number Of Chicks In This HK_Batches Instance.

Definition at line 145 of file HK_Batches.cpp.

◆ TotalEggs()

int HK_Batches::TotalEggs ( )

Returns Total Number Of Eggs In This HK_Batches Instance.

Definition at line 136 of file HK_Batches.cpp.

Member Data Documentation

◆ HK_BatchDirty

vector<bool> HK_Batches::HK_BatchDirty
private

Definition at line 25 of file Batches.h.

◆ HK_BatchInstance

vector<HK_Batch> HK_Batches::HK_BatchInstance
private

Definition at line 24 of file Batches.h.


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