$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r56315 - in sandbox/explore: boost/explore libs/explore/doc libs/explore/test
From: jeff_at_[hidden]
Date: 2009-09-19 19:11:43
Author: jefffaust
Date: 2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
New Revision: 56315
URL: http://svn.boost.org/trac/boost/changeset/56315
Log:
change row to cols
Text files modified: 
   sandbox/explore/boost/explore/container_stream_state.hpp |    12 ++++++------                            
   sandbox/explore/boost/explore/manipulators.hpp           |    16 ++++++++--------                        
   sandbox/explore/boost/explore/stream_container.hpp       |     8 ++++----                                
   sandbox/explore/libs/explore/doc/custom_delimeters.qbk   |     4 ++--                                    
   sandbox/explore/libs/explore/test/columnated.cpp         |    10 +++++-----                              
   5 files changed, 25 insertions(+), 25 deletions(-)
Modified: sandbox/explore/boost/explore/container_stream_state.hpp
==============================================================================
--- sandbox/explore/boost/explore/container_stream_state.hpp	(original)
+++ sandbox/explore/boost/explore/container_stream_state.hpp	2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
@@ -59,7 +59,7 @@
     struct container_common_stream_state
     {
         container_common_stream_state(const std::ios_base* stream)
-            : m_level(0), m_depth(0), m_rows(1), m_itemwidth(1), m_quotestrings(false)
+            : m_level(0), m_depth(0), m_cols(1), m_itemwidth(1), m_quotestrings(false)
         {
         }
 
@@ -76,8 +76,8 @@
 
         std::size_t depth() const { return m_depth; }
 
-        std::size_t rows() const { return at(m_rows); }
-        void set_rows(std::size_t rows) { at(m_rows) = rows; }
+        std::size_t cols() const { return at(m_cols); }
+        void set_cols(std::size_t cols) { at(m_cols) = cols; }
 
         std::size_t itemwidth() const { return at(m_itemwidth); }
         void set_itemwidth(std::size_t iw) { at(m_itemwidth) = iw; }
@@ -89,7 +89,7 @@
         {
             std::swap(m_level, other.m_level);
             std::swap(m_depth, other.m_depth);
-            std::swap(m_rows, other.m_rows);
+            std::swap(m_cols, other.m_cols);
             std::swap(m_itemwidth, other.m_itemwidth);
             std::swap(m_quotestrings, other.m_quotestrings);
         }
@@ -98,7 +98,7 @@
         {
             return other.m_level == m_level &&
                    other.m_depth == m_depth &&
-                   other.m_rows == m_rows &&
+                   other.m_cols == m_cols &&
                    other.m_itemwidth == m_itemwidth &&
                    other.m_quotestrings == m_quotestrings;
         }
@@ -127,7 +127,7 @@
         std::size_t m_level;
         std::size_t m_depth;
 
-        size_cont_typ m_rows;
+        size_cont_typ m_cols;
         size_cont_typ m_itemwidth;
 
         bool m_quotestrings;
Modified: sandbox/explore/boost/explore/manipulators.hpp
==============================================================================
--- sandbox/explore/boost/explore/manipulators.hpp	(original)
+++ sandbox/explore/boost/explore/manipulators.hpp	2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
@@ -166,13 +166,13 @@
             explore::get_stream_state<container_common_stream_state>(ostr)->set_level(l);
         }
 
-        // function ptr object for setrows
-        void setrowsFn(std::ios_base& ostr, std::size_t sz)
+        // function ptr object for cols
+        void setcolsFn(std::ios_base& ostr, std::size_t sz)
         {
-            explore::get_stream_state<container_common_stream_state>(ostr)->set_rows(sz);
+            explore::get_stream_state<container_common_stream_state>(ostr)->set_cols(sz);
         }
         
-        // function ptr object for setrows
+        // function ptr object for item_width
         void setitemwidthFn(std::ios_base& ostr, std::size_t sz)
         {
             explore::get_stream_state<container_common_stream_state>(ostr)->set_itemwidth(sz);
@@ -262,15 +262,15 @@
         return explore::get_stream_state<container_common_stream_state>(ostr)->level();
     }
 
-    detail::manipfunc<std::size_t> rows(std::size_t sz)
+    detail::manipfunc<std::size_t> cols(std::size_t sz)
     {
-        return detail::manipfunc<std::size_t>(detail::setrowsFn, sz);
+        return detail::manipfunc<std::size_t>(detail::setcolsFn, sz);
     }
     
     template<typename Elem, typename Tr>
-    std::size_t get_rows(std::basic_ostream<Elem, Tr>& ostr)
+    std::size_t get_cols(std::basic_ostream<Elem, Tr>& ostr)
     {
-        return explore::get_stream_state<container_common_stream_state>(ostr)->get_rows();
+        return explore::get_stream_state<container_common_stream_state>(ostr)->get_cols();
     }    
     
     detail::manipfunc<std::size_t> item_width(std::size_t sz)
Modified: sandbox/explore/boost/explore/stream_container.hpp
==============================================================================
--- sandbox/explore/boost/explore/stream_container.hpp	(original)
+++ sandbox/explore/boost/explore/stream_container.hpp	2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
@@ -32,9 +32,9 @@
         // starting delimiter
         ostr << state->start();
 
-        std::size_t rows = common_state->rows();
+        std::size_t cols = common_state->cols();
 
-        std::size_t cur_row = 0;
+        std::size_t cur_col = 0;
         while( first != last )
         {
             // value
@@ -45,10 +45,10 @@
                 // separation delimiter
                 ostr << state->separator();
 
-                if( rows && ++cur_row == rows )
+                if( cols && ++cur_col == cols )
                 {
                     ostr << '\n';
-                    cur_row = 0;
+                    cur_col = 0;
                 }
             }
         }
Modified: sandbox/explore/libs/explore/doc/custom_delimeters.qbk
==============================================================================
--- sandbox/explore/libs/explore/doc/custom_delimeters.qbk	(original)
+++ sandbox/explore/libs/explore/doc/custom_delimeters.qbk	2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
@@ -17,8 +17,8 @@
     [[assoc_item_start(char*)]     ['']     [Changes the string output at the front of an association item.]]
     [[assoc_item_end(char*)]       ['']     [Changes the string output at the end of an association item.]]
     [[assoc_item_seperator(char*)] [':']    [Changes the string output in between elements of an association item.]]
-    [[rows(size_t)]                [???]    [???]]
-    [[item_wdth(size_t)]           [???]    [???]]
+    [[cols(size_t)]                [all]    [Defines how many values will print on each line]]
+    [[item_width(size_t)]          [0]      [Defines each contained item's width, similar to std::setw]]
 ]
 
 [important There are both char* and wchar_t* versions of all string manipulator functions. However, you can only use char manipulators with ostreams and
Modified: sandbox/explore/libs/explore/test/columnated.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/columnated.cpp	(original)
+++ sandbox/explore/libs/explore/test/columnated.cpp	2009-09-19 19:11:42 EDT (Sat, 19 Sep 2009)
@@ -16,14 +16,14 @@
 template<typename C>
 struct columnated_format
 {
-    columnated_format(std::size_t rows, std::size_t width) : m_rows(rows), m_width(width) {}
-    std::size_t m_rows;
+    columnated_format(std::size_t cols, std::size_t width) : m_cols(cols), m_width(width) {}
+    std::size_t m_cols;
     std::size_t m_width;
 
     friend std::basic_ostream<C>& operator<<(std::basic_ostream<C>& ostr, const columnated_format<C>& f)
     {
         using namespace boost::explore;
-        ostr << rows(f.m_rows) << item_width(f.m_width)
+        ostr << cols(f.m_cols) << item_width(f.m_width)
              << separator(str_to<C>("")) << start(str_to<C>("")) << boost::explore::end(str_to<C>(""));
         return ostr;
     }
@@ -40,7 +40,7 @@
         vi.push_back(i);
     }
 
-    str_out << rows(3) << start(str_to<C>("")) << boost::explore::end(str_to<C>("")) << vi;
+    str_out << cols(3) << start(str_to<C>("")) << boost::explore::end(str_to<C>("")) << vi;
 
     BOOST_CHECK_EQUAL(output(str_out),
         "0, 1, 2, \n"
@@ -50,7 +50,7 @@
 
     reset(str_out);
 
-    str_out << rows(3) << item_width(5) << start(str_to<C>("")) << boost::explore::end(str_to<C>("")) << vi;
+    str_out << cols(3) << item_width(5) << start(str_to<C>("")) << boost::explore::end(str_to<C>("")) << vi;
 
     BOOST_CHECK_EQUAL(output(str_out),
         "    0,     1,     2, \n"