-
Notifications
You must be signed in to change notification settings - Fork 1
/
WorkMessage.h
75 lines (57 loc) · 1.39 KB
/
WorkMessage.h
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
/*
* File: WorkMessage.h
* Author: Tomáš Čerevka, Adam Činčira
*
* Created on November 13, 2011, 11:32 AM
*/
#ifndef WORKMESSAGE_H
#define WORKMESSAGE_H
#include <vector>
#include "SpaceItem.h"
#include "global.h"
/**
* Kontejner pro prepreaveni vice {@link SpaceItem}u.
* @author Tomáš Čerevka
* @author Adam Činčura
*/
class WorkMessage {
public:
/**
* Konstruktor.
*/
WorkMessage();
/**
* Destruktor.
*/
virtual ~WorkMessage();
/**
* Prida do kontejneru dalsi {@link SpaceItem}.
* @param SpaceItem& Pridavany prvek prostoru.
*/
void addItem(SpaceItem&);
inline const vector<SpaceItem>* getItems(void) const {
return &items;
}
/**
* Serializuje cely kontejner.
* @param char* Buffer.
* @param int& Pozice v bufferu.
*/
void serialize(char*, int&) const;
/**
* Deserializuje cely kontejner.
* @paream char* Buffer.
* @param int& Pozice v bufferu.
*/
void deserialize(char*, int&);
/**
* Pretizeny operator pro vypis kontejneru.
* @param ostream& Vstupni stream.
* @param const WorkMessage& Vypisovany kontejner.
* @return ostream& Vystupni stream.
*/
friend ostream& operator<<(ostream&, const WorkMessage&);
private:
vector<SpaceItem> items;
};
#endif /* WORKMESSAGE_H */