From: Baptiste L. <bl...@us...> - 2004-06-13 11:57:04
|
Update of /cvsroot/cpptool/rfta/deplib/boostcvs/libs/filesystem/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3989/libs/filesystem/src Modified Files: convenience.cpp exception.cpp Log Message: * added boost 1.30.2 headers & sources Index: convenience.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/deplib/boostcvs/libs/filesystem/src/convenience.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** convenience.cpp 10 May 2003 15:17:32 -0000 1.2 --- convenience.cpp 13 Jun 2004 11:56:54 -0000 1.3 *************** *** 29,57 **** } - std::string extension(const path& ph) - { - std::string leaf = ph.leaf(); - - std::string::size_type n = leaf.rfind('.'); - if (n != std::string::npos) - return leaf.substr(n); - else - return std::string(); - } - - std::string basename(const path& ph) - { - std::string leaf = ph.leaf(); - - std::string::size_type n = leaf.rfind('.'); - return leaf.substr(0, n); - } - - path change_extension(const path& ph, const std::string& new_extension) - { - return ph.branch_path() / (basename(ph) + new_extension); - } - - } // namespace filesystem } // namespace boost --- 29,32 ---- Index: exception.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/deplib/boostcvs/libs/filesystem/src/exception.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** exception.cpp 10 May 2003 15:17:32 -0000 1.3 --- exception.cpp 13 Jun 2004 11:56:54 -0000 1.4 *************** *** 180,186 **** } - const fs::path empty_path; - const std::string empty_string; - const char * no_context_msg = "filesystem_error"; } // unnamed namespace --- 180,183 ---- *************** *** 189,204 **** namespace filesystem { - // filesystem_error m_imp class --------------------------------------------// - // see www.boost.org/more/error_handling.html for implemenation rationale - - class filesystem_error::m_imp - { - public: - std::string m_who; - path m_path1; - path m_path2; - std::string m_what; - }; - // filesystem_error implementation -----------------------------------------// --- 186,189 ---- *************** *** 207,220 **** const std::string & who, const std::string & message ) ! : m_sys_err(0), m_err(other_error) ! { ! try ! { ! m_imp_ptr.reset( new m_imp ); ! m_imp_ptr->m_who = who; ! m_imp_ptr->m_what = other_error_prep( who, message ); ! } ! catch (...) { m_imp_ptr.reset(); } ! } filesystem_error::filesystem_error( --- 192,199 ---- const std::string & who, const std::string & message ) ! : std::runtime_error( ! other_error_prep( who, message ).c_str() ), ! m_sys_err(0), m_err(other_error), m_who(who) ! {} filesystem_error::filesystem_error( *************** *** 222,236 **** const path & path1, const std::string & message ) ! : m_sys_err(0), m_err(other_error) ! { ! try ! { ! m_imp_ptr.reset( new m_imp ); ! m_imp_ptr->m_who = who; ! m_imp_ptr->m_what = other_error_prep( who, path1, message ); ! m_imp_ptr->m_path1 = path1; ! } ! catch (...) { m_imp_ptr.reset(); } ! } filesystem_error::filesystem_error( --- 201,208 ---- const path & path1, const std::string & message ) ! : std::runtime_error( ! other_error_prep( who, path1, message ).c_str() ), ! m_sys_err(0), m_err(other_error), m_who(who), m_path1(path1) ! {} filesystem_error::filesystem_error( *************** *** 238,252 **** const path & path1, int sys_err_code ) ! : m_sys_err(sys_err_code), m_err(lookup_error(sys_err_code)) ! { ! try ! { ! m_imp_ptr.reset( new m_imp ); ! m_imp_ptr->m_who = who; ! m_imp_ptr->m_what = system_error_prep( who, path1, sys_err_code ); ! m_imp_ptr->m_path1 = path1; ! } ! catch (...) { m_imp_ptr.reset(); } ! } filesystem_error::filesystem_error( --- 210,218 ---- const path & path1, int sys_err_code ) ! : std::runtime_error( ! system_error_prep( who, path1, sys_err_code ).c_str() ), ! m_sys_err(sys_err_code), m_err(lookup_error(sys_err_code)), ! m_who(who), m_path1(path1) ! {} filesystem_error::filesystem_error( *************** *** 255,270 **** const path & path2, int sys_err_code ) ! : m_sys_err(sys_err_code), m_err(lookup_error(sys_err_code)) ! { ! try ! { ! m_imp_ptr.reset( new m_imp ); ! m_imp_ptr->m_who = who; ! m_imp_ptr->m_what = system_error_prep( who, path1, path2, sys_err_code ); ! m_imp_ptr->m_path1 = path1; ! m_imp_ptr->m_path2 = path2; ! } ! catch (...) { m_imp_ptr.reset(); } ! } filesystem_error::~filesystem_error() throw() --- 221,229 ---- const path & path2, int sys_err_code ) ! : std::runtime_error( ! system_error_prep( who, path1, path2, sys_err_code ).c_str() ), ! m_sys_err(sys_err_code), m_err(lookup_error(sys_err_code)), ! m_who(who), m_path1(path1), m_path2(path2) ! {} filesystem_error::~filesystem_error() throw() *************** *** 272,296 **** } - const std::string & filesystem_error::who() const - { - return m_imp_ptr.get() == 0 ? empty_string : m_imp_ptr->m_who; - } - - const path & filesystem_error::path1() const - { - return m_imp_ptr.get() == 0 ? empty_path : m_imp_ptr->m_path1; - } - - const path & filesystem_error::path2() const - { - return m_imp_ptr.get() == 0 ? empty_path : m_imp_ptr->m_path2; - } - - const char * filesystem_error::what() const throw() - { - return m_imp_ptr.get() == 0 ? empty_string.c_str() - : m_imp_ptr->m_what.c_str(); - } - namespace detail { --- 231,234 ---- |