Parent Directory | Revision Log
Finished (???) administration part - plus made a dummy offline version of the DatabaseLayer class.
1 | torben | 6 | #pragma once |
2 | |||
3 | //Forward declaration | ||
4 | class DatabaseLayer; | ||
5 | |||
6 | |||
7 | //CommonStorage er en implementation af singleton "mønstret" | ||
8 | class CommonStorage | ||
9 | { | ||
10 | public: | ||
11 | static CommonStorage *Instance(); | ||
12 | torben | 9 | ~CommonStorage(void); |
13 | torben | 6 | |
14 | //setters and getters er inline funktioner | ||
15 | void setDBLayer(DatabaseLayer *d) {dbl = d;} | ||
16 | DatabaseLayer *getDBLayer() {return dbl;} | ||
17 | |||
18 | void setAdmin(bool admin) {isAdmin = admin;} | ||
19 | bool getAdmin() {return isAdmin;} | ||
20 | |||
21 | protected: | ||
22 | CommonStorage(void); | ||
23 | CommonStorage(const CommonStorage&); | ||
24 | CommonStorage& operator=(const CommonStorage&); | ||
25 | |||
26 | private: | ||
27 | //static CommonStorage *pinstance; | ||
28 | |||
29 | DatabaseLayer *dbl; | ||
30 | bool isAdmin; | ||
31 | }; |
ViewVC Help | |
Powered by ViewVC 1.1.20 |