-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTable.h
More file actions
49 lines (37 loc) · 1.13 KB
/
Table.h
File metadata and controls
49 lines (37 loc) · 1.13 KB
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
44
45
46
47
48
49
//
// Created by Lenovo on 4/25/2017.
//
#ifndef DATABASE_TABLE_H
#define DATABASE_TABLE_H
#include <map>
#include "TableRow.h"
template <typename T, typename Y, typename V>
class Table {
private:
map<int,TableRow<T>> intRows;
map<int,TableRow<Y>> stringRows;
map<int,TableRow<V>> doubleRows;
string name;
int count;
public:
const string &getName() const;
void save(string fileName);
Table(const string &name);
void getTableData(int num);
void displayTableRow(int num);
string getRowType(int num);
int getAllMapsSize();
void print();
void setName(const string &name);
void insertIntTableRow(TableRow<T> row);
void insertStringTableRow(TableRow<Y> row);
void countDoubleValues(int pos,V value);
void countIntValues(int pos, T value);
void countStringValues(int pos,Y value);
void insertDoubleTableRow(TableRow<V> row);
void describeTable();
void min(int searchColumn,int targetColumn, double value);
void max(int searchColumn,int targetColumn, double value);
void sum(int searchColumn,int targetColumn, double value);
};
#endif //DATABASE_TABLE_H