| 58 | /// in whatever form is most appropriate, using any of the features of the IndexedIO. |
| 59 | template<> |
| 60 | void DateTimeData::save( SaveContext *context ) const |
| 61 | { |
| 62 | Data::save( context ); |
| 63 | IndexedIO *container = context->rawContainer(); |
| 64 | |
| 65 | /// This is cross-platform and handles special values cleanly. It's also going to be smaller than |
| 66 | /// creating a proper container, and storing the day/month/year/time_of_day components individually. |
| 67 | /// Boost doesn't make this any easier for us as many of the time functions deal with "long" integer types, |
| 68 | /// meaning that on 32-bit platforms can't just store the number of nanoseconds since midnight (there are |
| 69 | /// ~10^14 nanoseconds in a day) |
| 70 | container->write( g_valueEntry, boost::posix_time::to_iso_string( readable() ) ); |
| 71 | } |
| 72 | |
| 73 | /// Here we specialise the TypedData::load() method to correctly load the data produced by save(). |
| 74 | template<> |
nothing calls this directly
no test coverage detected