-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdult.cpp
61 lines (54 loc) · 1.11 KB
/
Adult.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Forager.cpp: implementation of the CAdult class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Adult.h"
#include "VarroaPop.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAdult::CAdult()
{
m_Lifespan = 0.0;
m_CurrentAge = 0.0;
m_Mites = 0;
m_Virgins = 0.0;
m_ForageInc = 0.0;
number = 0;
}
CAdult::CAdult(int theNumber)
{
m_Lifespan = 0.0;
m_CurrentAge = 0.0;
m_Mites = 0;
m_Virgins = 0.0;
m_ForageInc = 0.0;
number = theNumber;
}
CAdult::~CAdult()
{
}
void CAdult::Serialize(CArchive& ar)
{
CBee::Serialize(ar);
if (ar.IsStoring())
{ // storing code
ar << m_Lifespan;
ar << m_CurrentAge;
ar << m_Virgins;
ar << m_ForageInc;
}
else
{ // loading code
ar >> m_Lifespan;
ar >> m_CurrentAge;
ar >> m_Virgins;
ar >> m_ForageInc;
}
CBee::Serialize(ar);
}