$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71720 - trunk/boost/date_time
From: marshall_at_[hidden]
Date: 2011-05-04 15:54:37
Author: marshall
Date: 2011-05-04 15:54:36 EDT (Wed, 04 May 2011)
New Revision: 71720
URL: http://svn.boost.org/trac/boost/changeset/71720
Log:
added 'load_from_stream'; refs #2475
Text files modified: 
   trunk/boost/date_time/tz_db_base.hpp |    15 +++++++++++----                         
   1 files changed, 11 insertions(+), 4 deletions(-)
Modified: trunk/boost/date_time/tz_db_base.hpp
==============================================================================
--- trunk/boost/date_time/tz_db_base.hpp	(original)
+++ trunk/boost/date_time/tz_db_base.hpp	2011-05-04 15:54:36 EDT (Wed, 04 May 2011)
@@ -167,6 +167,16 @@
       tz_db_base() {}
 
       //! Process csv data file, may throw exceptions
+      /*! May throw bad_field_count exceptions */
+      void load_from_stream(std::istream &in)
+      {
+        std::string  buff;
+        while( std::getline(in, buff)) {
+          parse_string(buff);
+        }
+      }
+
+      //! Process csv data file, may throw exceptions
       /*! May throw data_not_accessible, or bad_field_count exceptions */
       void load_from_file(const std::string& pathspec)
       {
@@ -178,10 +188,7 @@
           boost::throw_exception(data_not_accessible(pathspec));
         }
         std::getline(ifs, buff); // first line is column headings
-
-        while( std::getline(ifs, buff)) {
-          parse_string(buff);
-        }
+        this->load_from_stream(ifs);
       }
 
       //! returns true if record successfully added to map