-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPathConfig.h
More file actions
43 lines (29 loc) · 811 Bytes
/
PathConfig.h
File metadata and controls
43 lines (29 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef PATH_CONFIG_H
#define PATH_CONFIG_H
#include <stdio.h>
#include <iostream>
using namespace std;
// test settings file should have the
// catalog_dir, dbfile_dir, statistics_path information in separate lines
static const char *settings = "tests/test.cat";
class PathConfig {
friend class Database;
private:
static PathConfig *instance;
char *catalogDir;
char *dbFileDir;
char *statisticsFilePath;
PathConfig();
public:
static PathConfig *GetInstance() {
if (instance == NULL) {
instance = new PathConfig();
}
return instance;
}
char *GetSchemaPath(const char *tableName);
char *GetDBFilePath(const char *tableName);
char *GetMetadataFilePath(const char *filePath);
char *GetStatisticsFilePath();
};
#endif