blob: c58ff1a8a8700d6dbb786de772358093fab7e204 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include <pch.hpp>
#include "p2Helpers.h"
#include <commonHelpers.h>
template <>
VariableType &
operator<<<Common::Duration>(VariableType & vt, const Common::Duration & d)
{
return (vt = *d);
}
template <>
VariableType &
operator<<<Common::DateTime>(VariableType & vt, const Common::DateTime & dt)
{
return (vt = *dt);
}
template <>
const VariableType &
operator>><Common::Duration>(const VariableType & vt, Common::Duration & d)
{
const boost::posix_time::time_duration & dur = vt;
d = *dur;
return vt;
}
template <>
const VariableType &
operator>><Common::DateTime>(const VariableType & vt, Common::DateTime & dt)
{
const boost::posix_time::ptime & date = vt;
dt = *date;
return vt;
}
template <>
const VariableType &
operator>>(const VariableType & vt, short int & v)
{
v = (int)vt;
return vt;
}
|