00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00038 #if !defined( OESS_1__IO__CUSTOM__ACE__DATE_TIME_HPP )
00039 #define OESS_1__IO__CUSTOM__ACE__DATE_TIME_HPP
00040
00041 #include <ace/Date_Time.h>
00042
00043 #include <oess_1/io/h/stream.hpp>
00044
00059 inline oess_1::io::ostream_t &
00060 operator<<( oess_1::io::ostream_t & out, const ACE_Date_Time & d )
00061 {
00062 return ( out
00063 << static_cast< oess_1::short_t >( d.year() )
00064 << static_cast< oess_1::char_t >( d.month() )
00065 << static_cast< oess_1::char_t >( d.day() )
00066 << static_cast< oess_1::char_t >( d.hour() )
00067 << static_cast< oess_1::char_t >( d.minute() )
00068 << static_cast< oess_1::char_t >( d.second() )
00069 << static_cast< oess_1::int_t >( d.microsec() )
00070 << static_cast< oess_1::char_t >( d.weekday() ) );
00071 }
00072
00079 inline oess_1::io::istream_t &
00080 operator>>( oess_1::io::istream_t & in, ACE_Date_Time & d )
00081 {
00082 oess_1::short_t year;
00083 oess_1::char_t month, day, hour, minute, seconds, weekday;
00084 oess_1::int_t microsec;
00085
00086 in >> year >> month >> day >> hour >> minute >> seconds
00087 >> microsec >> weekday;
00088 d = ACE_Date_Time( day, month, year, hour, minute, seconds,
00089 microsec, weekday );
00090
00091 return in;
00092 }
00093
00094 #endif
00095