/[H6]/CommonStorage.h
ViewVC logotype

Annotation of /CommonStorage.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (hide annotations) (download)
Wed Aug 30 21:57:57 2006 UTC (17 years, 8 months ago) by torben
File MIME type: text/plain
File size: 662 byte(s)
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