moved convert_adaptor and convertstream into Arabica::io namespace

This commit is contained in:
jez 2007-09-10 17:39:52 +00:00
parent 0525191ebe
commit 8fe1e5f9c5
6 changed files with 13 additions and 15 deletions

View file

@ -6,8 +6,6 @@
#include <SAX/SAXException.hpp>
#include <SAX/Locator.hpp>
#include <sstream>
#include <io/convertstream.hpp>
#include <Utils/StringAdaptor.hpp>
namespace Arabica

View file

@ -79,9 +79,9 @@ public:
static string_type construct_from_utf16(const wchar_t* str, int length);
static std::wstring asStdWString(const string_type& str);
typedef Arabica::convert::basic_iconvertstream<wchar_t, std::char_traits<wchar_t>,
typedef Arabica::io::basic_iconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > widener_t;
typedef Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
typedef Arabica::io::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > narrower_t;

View file

@ -26,7 +26,7 @@
namespace Arabica
{
namespace convert
namespace io
{
template<typename charT,
@ -349,6 +349,6 @@ class oconvert_adaptor : private convert_adaptor_buffer<charT, traitsT, toCharT,
void set_stream(toStreamT& toStream) { bufadaptor_.set_buffer(*toStream.rdbuf()); }
}; // class oconvert_adaptor
} // namespace convert
} // namespace io
} // namespace Arabica
#endif

View file

@ -50,7 +50,7 @@
namespace Arabica
{
namespace convert
namespace io
{
template<typename charT, typename traitsT>
@ -297,6 +297,6 @@ typedef basic_iconvertstream<wchar_t> converting_iwstringstream;
typedef basic_oconvertstream<wchar_t> converting_owstringstream;
#endif
} // namespace convert
} // namespace io
} // namespace Arabica
#endif

View file

@ -54,8 +54,8 @@ silly_string silly_string_adaptor::construct_from_utf8(const char* str, int leng
#ifndef ARABICA_NO_WCHAR_T
silly_string silly_string_adaptor::construct_from_utf16(const wchar_t* str)
{
Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > narrower;
Arabica::io::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > narrower;
narrower.imbue(std::locale(narrower.getloc(), new Arabica::convert::utf8ucs2codecvt()));
narrower.str(str ? str : L"");
silly_string s;
@ -65,8 +65,8 @@ silly_string silly_string_adaptor::construct_from_utf16(const wchar_t* str)
silly_string silly_string_adaptor::construct_from_utf16(const wchar_t* str, int length)
{
Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > narrower;
Arabica::io::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
char, std::char_traits<char> > narrower;
narrower.imbue(std::locale(narrower.getloc(), new Arabica::convert::utf8ucs2codecvt()));
narrower.str(std::wstring(str, length));
silly_string s;
@ -130,8 +130,8 @@ std::string silly_string_adaptor::asStdString(const silly_string& str)
#ifndef ARABICA_NO_WCHAR_T
std::wstring silly_string_adaptor::asStdWString(const silly_string& str)
{
Arabica::convert::basic_oconvertstream<char, std::char_traits<char>,
wchar_t, std::char_traits<wchar_t> > widener;
Arabica::io::basic_oconvertstream<char, std::char_traits<char>,
wchar_t, std::char_traits<wchar_t> > widener;
std::codecvt<char, wchar_t, std::mbstate_t>* cc = new Arabica::convert::ucs2utf8codecvt();
widener.imbue(std::locale(widener.getloc(), cc));
widener.str(str.s_);

View file

@ -922,7 +922,7 @@
</FileConfiguration>
</File>
<Filter
Name="Utils"
Name="XML"
>
<File
RelativePath="..\src\XML\XMLCharacterClasses.cpp"