equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright 2004-2006 Intel Corporation |
|
3 * |
|
4 * Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 * you may not use this file except in compliance with the License. |
|
6 * You may obtain a copy of the License at |
|
7 * |
|
8 * http://www.apache.org/licenses/LICENSE-2.0 |
|
9 * |
|
10 * Unless required by applicable law or agreed to in writing, software |
|
11 * distributed under the License is distributed on an "AS IS" BASIS, |
|
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 * See the License for the specific language governing permissions and |
|
14 * limitations under the License. |
|
15 */ |
|
16 |
|
17 #ifndef _SQL_GLOBAL_STORE_H_ |
|
18 #define _SQL_GLOBAL_STORE_H_ |
|
19 |
|
20 #include "GlobalStore.h" |
|
21 |
|
22 namespace oasys { |
|
23 class SQLImplementation; |
|
24 } |
|
25 |
|
26 namespace dtn { |
|
27 |
|
28 class SQLStore; |
|
29 |
|
30 /** |
|
31 * Implementation of GlobalStore that uses an underlying SQL database. |
|
32 */ |
|
33 class SQLGlobalStore : public GlobalStore { |
|
34 public: |
|
35 /** |
|
36 * Constructor |
|
37 */ |
|
38 SQLGlobalStore(oasys::SQLImplementation* impl); |
|
39 |
|
40 /** |
|
41 * Destructor |
|
42 */ |
|
43 virtual ~SQLGlobalStore(); |
|
44 |
|
45 /** |
|
46 * Load in the values from the database. |
|
47 */ |
|
48 virtual bool load(); |
|
49 |
|
50 /** |
|
51 * Update the values in the database. |
|
52 */ |
|
53 virtual bool update(); |
|
54 |
|
55 protected: |
|
56 SQLStore* store_; |
|
57 }; |
|
58 } // namespace dtn |
|
59 |
|
60 #endif /* _SQL_GLOBAL_STORE_H_ */ |