-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bee.cpp
75 lines (63 loc) · 1.24 KB
/
Bee.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Bee.cpp : implementation file
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Bee.h"
#include "VarroaPop.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBee
IMPLEMENT_DYNCREATE(CBee, CCmdTarget)
CBee::CBee()
{
number = 0;
age = 0.0;
Alive = true;
}
CBee::~CBee()
{
}
CBee CBee::operator=(CBee& bee)
{
CBee temp;
temp.number = bee.number;
temp.age = bee.age;
temp.Alive = bee.Alive;
return temp;
}
CBee::CBee(int Num)
{
age = 0.0;
number = Num;
Alive = true;
}
CBee::CBee(CBee& bee)
{
number = bee.number;
age = bee.age;
Alive = bee.Alive;
}
BEGIN_MESSAGE_MAP(CBee, CCmdTarget)
//{{AFX_MSG_MAP(CBee)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBee message handlers
void CBee::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{ // storing code
ar << number;
ar << age;
}
else
{ // loading code
ar >> number;
ar >> age;
}
}