-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataStructures.hpp
111 lines (106 loc) · 1.99 KB
/
dataStructures.hpp
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#ifndef DATASTRUCTURES_H
#define DATASTRUCTURES_H
#include <iostream>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/list.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/version.hpp>
#include <boost/serialization/split_member.hpp>
using std::string;
struct Address
{
string country;
string state;
string city;
int zipCode;
string street;
int streetNumber;
string buildingName;
int apartmentNum;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & country;
ar & state;
ar & city;
ar & zipCode;
ar & street;
ar & streetNumber;
ar & buildingName;
ar & apartmentNum;
}
};
struct School
{
string elementary;
string middle;
string high;
string college;
string grad;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & elementary;
ar & middle;
ar & high;
ar & college;
ar & grad;
}
};
/*struct Date_Time
{
int year;
int month;
string monthName; //Maybe later I'll autoconvert this...
int day;
string dayoftheweek;
int hour; //24 hour timescale\
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & year;
ar & month;
ar & monthName;
ar & day;
ar & dayoftheweek;
ar & hour;
}
};*/
struct Name
{
string first;
string midInitial;
string middle;
string last;
string title;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & first;
ar & midInitial;
ar & middle;
ar & last;
ar & title;
}
};
struct PassInfo
{
int length;
bool containsAlpha;
bool containsNumeric;
bool containsSymbols;
bool containsWhitespace;
bool containsCaps;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & length;
ar & containsAlpha;
ar & containsNumeric;
ar & containsSymbols;
ar & containsWhitespace;
ar & containsCaps;
}
};
#endif