hlit-mon
0.5.2
Main Page
Related Pages
Modules
Classes
Files
File List
All
Classes
Functions
Groups
Pages
Writer.h
1
5
#ifndef Writer_cpp
6
#define Writer_cpp
7
8
#include <czmq.h>
9
#include <map>
10
#include <mysql.h>
11
#include <stdio.h>
12
#include <stdlib.h>
13
#include <string>
14
#include <time.h>
15
16
using namespace
std;
17
24
class
Writer
{
25
public
:
26
Writer
();
27
virtual
~
Writer
();
28
33
bool
Connect_DB();
34
38
void
Create_Tables();
39
43
void
Clear_Tables();
44
49
void
Write(map<pair<string, string>, map<string, double> > map_journal);
50
54
void
Write_Day();
55
59
void
Write_Month();
60
65
void
Set_Server(
char
* serv);
66
71
void
Set_User(
char
* usr);
72
77
void
Set_Password(
char
* psd);
78
83
void
Set_Database(
char
* db);
84
88
void
Set_Off_Write_Day();
89
93
void
Set_Off_Write_Month();
94
98
void
Delete_Old_Records();
99
103
void
Check_Connection();
104
105
private
:
109
MYSQL* writer;
110
114
MYSQL* reader;
115
119
MYSQL_RES* res;
120
124
MYSQL_ROW row;
125
129
char
* server;
130
134
char
* user;
135
139
char
* password;
140
144
char
* database;
145
149
bool
write_day;
150
154
bool
write_month;
155
159
int
cur_day;
160
164
int
cur_month;
165
169
time_t t;
170
tm* tk;
171
};
172
173
#endif
174
Writer
This сlass interacts with the database.
Definition:
Writer.h:24
registrar
Writer.h
Generated by
1.8.5