author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 19 Nov 2010 00:11:16 +0100 | |
changeset 154 | 142730cfecee |
parent 65 | 76514757b0d6 |
permissions | -rw-r--r-- |
65
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
1 |
/** |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
2 |
* db_bridge/include/abstract_db.h |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
3 |
* Copyright 2008 (C) Markus Broeker |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
4 |
*/ |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
5 |
|
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
6 |
#ifndef ABSTRACT_DB_H |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
7 |
#define ABSTRACT_DB_H |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
8 |
|
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
9 |
#include <vector> |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
10 |
#include <string> |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
11 |
|
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
12 |
class Abstract_DB { |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
13 |
protected: |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
14 |
std::string user; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
15 |
std::string database; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
16 |
std::string password; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
17 |
std::string server; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
18 |
|
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
19 |
public: |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
20 |
typedef std::vector <std::vector <std::string> >DB_RESULT; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
21 |
typedef std::vector <std::string> DB_ROW; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
22 |
|
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
23 |
virtual bool connect () = 0; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
24 |
virtual DB_RESULT query (std::string) = 0; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
25 |
}; |
76514757b0d6
GNU Indent cannot handle C++ Source Files...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
26 |
#endif |