blob: af77c0f642a540cbb5382be83dbd401ee2b7b221 (
plain)
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
|
#ifndef ODBC_TIMETYPEPAIR_H
#define ODBC_TIMETYPEPAIR_H
#include <time.h>
#include <sql.h>
namespace ODBC {
class TimeTypePair {
typedef SQL_TIMESTAMP_STRUCT SQL_TS;
public:
TimeTypePair ();
TimeTypePair (const tm&);
TimeTypePair (const SQL_TS&);
const SQL_TS& set(const tm&);
const tm& set(const SQL_TS&);
SQL_TS& sql() { return _sql; }
tm& c() { return _c; }
const SQL_TS& sql() const { return _sql; }
const tm& c() const { return _c; }
void sql2c() const;
void c2sql() const;
private:
mutable SQL_TS _sql;
mutable tm _c;
};
};
#endif
|