/[H8]/trunk/h8server/CommonStorage.h
ViewVC logotype

Annotation of /trunk/h8server/CommonStorage.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (hide annotations) (download)
Sun May 27 13:32:36 2007 UTC (17 years ago) by kevin
File MIME type: text/plain
File size: 910 byte(s)
case 0 problem
1 kevin 87 /*
2     * Developed by Torben H. Nielsen
3     */
4    
5     #pragma once
6    
7     //Forward declaration
8     class DatabaseLayer;
9    
10     #include "DatabaseLayer.h"
11     #include <vector>
12     #include "Containers.h"
13    
14     using namespace std;
15    
16    
17     //CommonStorage er en implementation af singleton "mønstret"
18     class CommonStorage
19     {
20     public:
21     static CommonStorage *Instance();
22     ~CommonStorage(void);
23    
24     //setters and getters er inline funktioner
25     void setDBLayer(DatabaseLayer *d) {dbl = d;}
26     DatabaseLayer *getDBLayer() {return dbl;}
27    
28     void setSearchResult(vector<Equipment> &ev) {equipments = ev;}
29     vector<Equipment>& getSearchResult() {return equipments;}
30    
31    
32     protected:
33     CommonStorage(void);
34     CommonStorage(const CommonStorage&);
35     CommonStorage& operator=(const CommonStorage&);
36    
37     private:
38     //static CommonStorage *pinstance;
39     DatabaseLayer *dbl;
40     vector<Equipment> equipments;
41 kevin 103 vector<translog> tl;
42 kevin 87 vector<log> logs;
43    
44     };

  ViewVC Help
Powered by ViewVC 1.1.20