-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path24.2 - Draft.txt
87 lines (78 loc) · 1.24 KB
/
24.2 - Draft.txt
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
class Activity{
int Type;
char* value;
}
class User{
Post** timeline;
}
class Date{
public static Date CurrentDate
public static SetCurrentDate()
}
class Page{
Post** timeline;
}
class Memory: public Post{
Post* originalPost;
}
class Object{
char* ID
}
class Page: public Object{
class User: public Object{
class Comment //id, text, commentBy
class Post{
char* Text;
Date SharedDate;
Activity* activity;
Object* SharedBy;
Object** LikedBy;
Comment** comments;
}
FB::LoadComment()
{
for(eof//12)
{
Comment* comment = new Comment;
fin>>id;
fin>>postID;
Post* postPtr = SearchPostByID(postID);
postPtr->AddComment(comment);
fin>>CommentBy
Object* commectBy = SearchObjectByID
fin>>text;
comment->SetValues(id,text,CommentBy);
}
}
FB::LoadPost()
{
for(){
posts[i]->LoadDataFromFile()
fin>>ui or pi
Object* sharedBy = fb.SearchObjectByID(uiOrPi)
posts[i]->SetSharedBy(sharedBy);
sharedBy->AddPostToTimeline(posts[i])
}
}
posts[i]->LoadDataFromFile()
{
fin>> 1/2
fin>>id
sharedDate.ReadFromFile()
fin>>txt
if(2)
activity = new activity
activity->ReadFromFile()
//back to fb scope
}
fb.LoadData()
{
LoadUser()
LoadPost()
LoadComment()
}
main
{
fb.LoadData()
currUser->ViewHome()//
}