/[H6]/CommonStorage.h
ViewVC logotype

Contents of /CommonStorage.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6 - (show annotations) (download)
Wed Aug 30 12:00:21 2006 UTC (17 years, 8 months ago) by torben
File MIME type: text/plain
File size: 638 byte(s)
Addet CommonStorage.[h|cpp] (singleton)
1 #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
13 //setters and getters er inline funktioner
14 void setDBLayer(DatabaseLayer *d) {dbl = d;}
15 DatabaseLayer *getDBLayer() {return dbl;}
16
17 void setAdmin(bool admin) {isAdmin = admin;}
18 bool getAdmin() {return isAdmin;}
19
20 protected:
21 CommonStorage(void);
22 CommonStorage(const CommonStorage&);
23 CommonStorage& operator=(const CommonStorage&);
24
25 private:
26 //static CommonStorage *pinstance;
27
28 DatabaseLayer *dbl;
29 bool isAdmin;
30 };

  ViewVC Help
Powered by ViewVC 1.1.20