|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59155 - in sandbox/filesystem-v3: boost/filesystem libs/filesystem/doc libs/filesystem/example libs/filesystem/src libs/filesystem/test
From: bdawes_at_[hidden]
Date: 2010-01-20 07:40:57
Author: bemandawes
Date: 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
New Revision: 59155
URL: http://svn.boost.org/trac/boost/changeset/59155
Log:
Rename path::localize -> path::preferred
Text files modified:
sandbox/filesystem-v3/boost/filesystem/path.hpp | 4 ++--
sandbox/filesystem-v3/libs/filesystem/doc/reference.html | 4 ++--
sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html | 18 +++++++++---------
sandbox/filesystem-v3/libs/filesystem/example/path_info.cpp | 14 +++++++-------
sandbox/filesystem-v3/libs/filesystem/src/path.cpp | 2 +-
sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp | 18 +++++++++---------
6 files changed, 30 insertions(+), 30 deletions(-)
Modified: sandbox/filesystem-v3/boost/filesystem/path.hpp
==============================================================================
--- sandbox/filesystem-v3/boost/filesystem/path.hpp (original)
+++ sandbox/filesystem-v3/boost/filesystem/path.hpp 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -205,10 +205,10 @@
path& replace_extension(const path& new_extension = path());
# ifdef BOOST_POSIX_API
- path& localize() { return *this; } // POSIX m_pathname already localized
+ path& preferred() { return *this; } // POSIX m_pathname already localized
# else // BOOST_WINDOWS_API
- path& localize(); // change slashes to backslashes
+ path& preferred(); // change slashes to backslashes
# endif
Modified: sandbox/filesystem-v3/libs/filesystem/doc/reference.html
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/doc/reference.html (original)
+++ sandbox/filesystem-v3/libs/filesystem/doc/reference.html 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -529,7 +529,7 @@
void swap(path& rhs);
path& remove_filename();
path& replace_extension(const path& new_extension = path());
- path& localize(); // POSIX: no effect. Windows: convert slashes to backslashes
+ path& preferred(); // POSIX: no effect. Windows: convert slashes to backslashes
// native format observers
const string_type& native() const; // native format, encoding
@@ -805,7 +805,7 @@
<code>new_extension</code>.</p>
<p><i>Returns:</i> <code>*this</code></p>
</blockquote>
-<pre>path& localize();</pre>
+<pre>path& preferred();</pre>
<blockquote>
<p><i>Effects:</i> The contained pathname is converted to the preferred native
format. [<i>Note:</i> On Windows, the effect is to replace slashes with
Modified: sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html (original)
+++ sandbox/filesystem-v3/libs/filesystem/doc/tutorial.html 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -57,8 +57,8 @@
<p><b>Boost Filesystem library <code>rename</code> function from
<filesystem.hpp></b></p>
<blockquote style="font-size: 10pt">
- <pre>void <a name="rename">rename</a>(const path& old_p, const path& new_p);
-void <a name="rename">rename</a>(const path& old_p, const path& new_p, system::error_code& ec);</pre>
+ <pre>void rename(const path& old_p, const path& new_p);
+void rename(const path& old_p, const path& new_p, system::error_code& ec);</pre>
</blockquote>
</td>
</tr>
@@ -527,7 +527,7 @@
composed path:
cout << -------------: /foo/bar/baa.txt
- localize()-----------: /foo/bar/baa.txt
+ preferred()----------: /foo/bar/baa.txt
...
observers, native format:
native()-------------: /foo/bar/baa.txt
@@ -544,7 +544,7 @@
composed path:
cout << -------------: /foo/bar/baa.txt
- localize()-----------: \foo\bar\baa.txt
+ preferred()----------: \foo\bar\baa.txt
...
observers, native format:
native()-------------: /foo/bar\baa.txt
@@ -583,7 +583,7 @@
<p dir="ltr"><code>path</code> objects always hold pathnames in the native
format, but otherwise leave them unchanged from their source. The
-localize() function will convert to the
+preferred() function will convert to the
preferred form, if the native format has several forms. Thus on Windows, it will
convert slashes to backslashes.</p>
@@ -677,7 +677,7 @@
cout << "\ncomposed path:\n";
cout << " cout << -------------: " << p << "\n";
-cout << " localize()-----------: " << p.localize() << "\n";</pre>
+cout << " preferred()----------: " << p.preferred() << "\n";</pre>
</blockquote>
</td>
</tr>
@@ -696,14 +696,14 @@
composed path:
cout << -------------: /foo/bar/baa.txt
- localize()-----------: /foo/bar/baa.txt</pre>
+ preferred()----------: /foo/bar/baa.txt</pre>
</td>
<td style="font-size: 10pt">
<pre>>path_info / foo/bar baa.txt
composed path:
cout << -------------: /foo/bar\baa.txt
- localize()-----------: \foo\bar\baa.txt</pre>
+ preferred()----------: \foo\bar\baa.txt</pre>
</td>
</tr>
</table>
@@ -752,7 +752,7 @@
<p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->12 January 2010<!--webbot bot="Timestamp" endspan i-checksum="32137" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->20 January 2010<!--webbot bot="Timestamp" endspan i-checksum="32134" --></p>
</body>
Modified: sandbox/filesystem-v3/libs/filesystem/example/path_info.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/example/path_info.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/example/path_info.cpp 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -20,11 +20,11 @@
{
cout << "Usage: path_info path-portion...\n"
"Example: path_info foo/bar baz\n"
-#ifdef BOOST_POSIX_PATH
+# ifdef BOOST_POSIX_PATH
" would report info about the composed path foo/bar/baz\n";
-#else // BOOST_WINDOWS_PATH
+# else // BOOST_WINDOWS_PATH
" would report info about the composed path foo/bar\\baz\n";
-#endif
+# endif
return 1;
}
@@ -35,7 +35,7 @@
cout << "\ncomposed path:\n";
cout << " cout << -------------: " << p << "\n";
- cout << " localize()-----------: " << path(p).localize() << "\n";
+ cout << " preferred()----------: " << path(p).preferred() << "\n";
cout << "\nelements:\n";
@@ -43,13 +43,13 @@
cout << " " << *it << '\n';
cout << "\nobservers, native format:" << endl;
-#ifdef BOOST_POSIX_API
+# ifdef BOOST_POSIX_API
cout << " native()-------------: " << p.native() << endl;
cout << " c_str()--------------: " << p.c_str() << endl;
-#else // BOOST_WINDOWS_API
+# else // BOOST_WINDOWS_API
wcout << L" native()-------------: " << p.native() << endl;
wcout << L" c_str()--------------: " << p.c_str() << endl;
-#endif
+# endif
cout << " string()-------------: " << p.string() << endl;
wcout << L" wstring()------------: " << p.wstring() << endl;
Modified: sandbox/filesystem-v3/libs/filesystem/src/path.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/src/path.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/src/path.cpp 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -175,7 +175,7 @@
return tmp.wstring();
}
- path & path::localize()
+ path & path::preferred()
{
for (string_type::iterator it = m_pathname.begin();
it != m_pathname.end(); ++it)
Modified: sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp
==============================================================================
--- sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp (original)
+++ sandbox/filesystem-v3/libs/filesystem/test/path_unit_test.cpp 2010-01-20 07:40:54 EST (Wed, 20 Jan 2010)
@@ -380,15 +380,15 @@
// operator /
- CHECK(p1 / p2 == path("foo/bar").localize());
- CHECK("foo" / p2 == path("foo/bar").localize());
- CHECK(L"foo" / p2 == path("foo/bar").localize());
- CHECK(string("foo") / p2 == path("foo/bar").localize());
- CHECK(wstring(L"foo") / p2 == path("foo/bar").localize());
- CHECK(p1 / "bar" == path("foo/bar").localize());
- CHECK(p1 / L"bar" == path("foo/bar").localize());
- CHECK(p1 / string("bar") == path("foo/bar").localize());
- CHECK(p1 / wstring(L"bar") == path("foo/bar").localize());
+ CHECK(p1 / p2 == path("foo/bar").preferred());
+ CHECK("foo" / p2 == path("foo/bar").preferred());
+ CHECK(L"foo" / p2 == path("foo/bar").preferred());
+ CHECK(string("foo") / p2 == path("foo/bar").preferred());
+ CHECK(wstring(L"foo") / p2 == path("foo/bar").preferred());
+ CHECK(p1 / "bar" == path("foo/bar").preferred());
+ CHECK(p1 / L"bar" == path("foo/bar").preferred());
+ CHECK(p1 / string("bar") == path("foo/bar").preferred());
+ CHECK(p1 / wstring(L"bar") == path("foo/bar").preferred());
swap(p1, p2);
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