Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61186 - sandbox/boost_docs/subprojects/DebuggerVisualizers
From: filip.konvicka_at_[hidden]
Date: 2010-04-10 14:18:37


Author: fkonvick
Date: 2010-04-10 14:18:36 EDT (Sat, 10 Apr 2010)
New Revision: 61186
URL: http://svn.boost.org/trac/boost/changeset/61186

Log:
Adding Bruno Durin's visualizer for boost::date_time
Added:
   sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime_direct.msvc8.vis.txt (contents, props changed)
Text files modified:
   sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime.msvc8.vis.txt | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime.msvc8.vis.txt
==============================================================================
--- sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime.msvc8.vis.txt (original)
+++ sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime.msvc8.vis.txt 2010-04-10 14:18:36 EDT (Sat, 10 Apr 2010)
@@ -7,7 +7,7 @@
 ;
 ; @guid C7541090-203E-11DE-8C30-0800200C9A66
 ; @platform msvc-8, msvc-9
-; @version 1.0
+; @version 1.1
 ; @header date_time_visualizer.hpp
 ; @author Filip Konvièka
 ; @email filip dot konvicka at logis dot cz
@@ -17,6 +17,7 @@
 ;
 ; Visualization must be enabled by including the header file date_time_visualizer.hpp in each translation unit.
 ; The visualization is not immediate, you must use the green 'Recalculate' icon.
+; If this is a problem, please consider using Bruno Durin's version (boost__DateTime_direct.msvc).
 ;
 
 ; Posix time

Added: sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime_direct.msvc8.vis.txt
==============================================================================
--- (empty file)
+++ sandbox/boost_docs/subprojects/DebuggerVisualizers/boost__DateTime_direct.msvc8.vis.txt 2010-04-10 14:18:36 EDT (Sat, 10 Apr 2010)
@@ -0,0 +1,106 @@
+;----------------------------------------
+; BOOST_VISUALIZER_START boost::date_time
+;
+; Copyright Bruno Durin 2010. Use, modification and distribution are subject
+; to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
+; or copy at http://www.boost.org/LICENSE_1_0.txt)
+;
+; @guid 2421DB60-44CC-11DF-9879-0800200C9A66
+; @platform msvc-8, msvc-9
+; @version 1.0
+; @author Bruno Durin
+; @email bruno dot durin at gmail dot com
+;
+; Usage
+; =====
+;
+; Unlike the other visualizer for date_time, this visualizer does not need a header
+; file to work. Note that the displayed time is in UTC.
+;
+
+;------------------------------------------------------------------------------
+; boost::gregorian::date visualizer
+;------------------------------------------------------------------------------
+
+boost::gregorian::date{
+ preview
+ (
+ #(
+ 100*((4*($c.days_+32044)+3)/146097)+((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461)-4800+(((5*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4)-(1461*((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)/10),
+ "-",
+ ((5*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4)-(1461*((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)+3-12*(((5*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4)-(1461*((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)/10),
+ "-",
+ ($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4)-(1461*((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461))/4)-((153*((5*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4)-(1461*((4*($c.days_+32044-((146097*((4*($c.days_+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)+2)/5)+1
+ )
+ )
+}
+
+;------------------------------------------------------------------------------
+; boost::gregorian::date_duration visualizer
+;------------------------------------------------------------------------------
+
+boost::gregorian::date_duration{
+ preview
+ (
+ #(
+ $c.days_.value_,
+ " days"
+ )
+ )
+}
+
+;------------------------------------------------------------------------------
+; boost::posix_time::time_duration visualizer
+; only works with microseconds resolution
+;------------------------------------------------------------------------------
+
+boost::posix_time::time_duration{
+ preview
+ (
+ #(
+ $c.ticks_.value_/86400000000,
+ "d ",
+ ($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000))/3600000000,
+ "h ",
+ ($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000)-3600000000*(($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000))/3600000000))/60000000,
+ "m ",
+ (($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000)-3600000000*(($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000))/3600000000))-60000000*(($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000) - 3600000000*(($c.ticks_.value_-86400000000*($c.ticks_.value_/86400000000))/3600000000))/60000000))/1000000,
+ "s ",
+ ($c.ticks_.value_%1000000)/1000,
+ "ms ",
+ $c.ticks_.value_%1000,
+ "us"
+ )
+ )
+}
+
+;------------------------------------------------------------------------------
+; boost::posix_time::ptime visualizer
+; only works with microseconds resolution
+;------------------------------------------------------------------------------
+
+boost::posix_time::ptime{
+ preview
+ (
+ #(
+ 100*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097)+((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461)-4800+(((5*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4)-(1461*((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)/10),
+ "-",
+ ((5*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4)-(1461*((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)+3-12*(((5*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4)-(1461*((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)/10),
+ "-",
+ (($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4)-(1461*((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461))/4)-((153*((5*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4)-(1461*((4*(($c.time_.time_count_.value_/86400000000)+32044-((146097*((4*(($c.time_.time_count_.value_/86400000000)+32044)+3)/146097))/4))+3)/1461))/4)+2)/153)+2)/5)+1,
+ " ",
+ ($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000))/3600000000,
+ "h",
+ ($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000)-3600000000*(($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000))/3600000000))/60000000,
+ "m",
+ (($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000)-3600000000*(($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000))/3600000000))-60000000*(($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000) - 3600000000*(($c.time_.time_count_.value_-86400000000*($c.time_.time_count_.value_/86400000000))/3600000000))/60000000))/1000000,
+ "s (",
+ $c.time_.time_count_.value_%1000000,
+ "us)"
+ )
+ )
+}
+
+;
+; BOOST_VISUALIZER_END boost::date_time
+;--------------------------------------


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk