1 #ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP
2 #define BOOST_ARCHIVE_CODECVT_NULL_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
12 // (C) Copyright 2004 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
20 #include <cstddef> // NULL, size_t
21 #include <cwchar> // for mbstate_t
22 #include <boost/config.hpp>
23 #include <boost/archive/detail/auto_link_archive.hpp>
24 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
26 #if defined(BOOST_NO_STDC_NAMESPACE)
27 // For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace.
28 // In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace)
29 # if !defined(UNDER_CE) || (!defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION))
43 class codecvt_null
<char> : public std::codecvt
<char, char, std::mbstate_t>
45 virtual bool do_always_noconv() const throw() {
49 explicit codecvt_null(std::size_t no_locale_manage
= 0) :
50 std::codecvt
<char, char, std::mbstate_t>(no_locale_manage
)
55 class codecvt_null
<wchar_t> : public std::codecvt
<wchar_t, char, std::mbstate_t>
57 virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result
)
59 std::mbstate_t & state
,
60 const wchar_t * first1
,
61 const wchar_t * last1
,
62 const wchar_t * & next1
,
67 virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result
)
69 std::mbstate_t & state
,
77 virtual int do_encoding( ) const throw( ){
78 return sizeof(wchar_t) / sizeof(char);
80 virtual int do_max_length( ) const throw( ){
85 } // namespace archive
88 #include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
90 #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP