1 #ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP
2 #define BOOST_ARCHIVE_CODECVT_NULL_HPP
4 // MS compatible compilers support #pragma once
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 #ifndef BOOST_NO_CWCHAR
22 #include <cwchar> // for mbstate_t
24 #include <boost/config.hpp>
25 #include <boost/serialization/force_include.hpp>
26 #include <boost/archive/detail/auto_link_archive.hpp>
27 //#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
29 #if defined(BOOST_NO_STDC_NAMESPACE)
31 // For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace.
32 // In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace)
33 # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
42 # pragma warning(push)
43 # pragma warning(disable : 4511 4512)
53 class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
55 bool do_always_noconv() const throw() BOOST_OVERRIDE {
59 explicit codecvt_null(std::size_t no_locale_manage = 0) :
60 std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
62 ~codecvt_null() BOOST_OVERRIDE {}
66 class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> :
67 public std::codecvt<wchar_t, char, std::mbstate_t>
69 BOOST_SYMBOL_EXPORT std::codecvt_base::result
71 std::mbstate_t & state,
72 const wchar_t * first1,
73 const wchar_t * last1,
74 const wchar_t * & next1,
78 ) const BOOST_OVERRIDE;
80 BOOST_SYMBOL_EXPORT std::codecvt_base::result
82 std::mbstate_t & state,
89 ) const BOOST_OVERRIDE;
91 BOOST_SYMBOL_EXPORT int do_encoding( ) const throw( ) BOOST_OVERRIDE {
92 return sizeof(wchar_t) / sizeof(char);
95 BOOST_SYMBOL_EXPORT bool do_always_noconv() const throw() BOOST_OVERRIDE {
99 BOOST_SYMBOL_EXPORT int do_max_length( ) const throw( ) BOOST_OVERRIDE {
100 return do_encoding();
103 BOOST_SYMBOL_EXPORT explicit codecvt_null(std::size_t no_locale_manage = 0);
105 BOOST_SYMBOL_EXPORT ~codecvt_null() BOOST_OVERRIDE ;
108 } // namespace archive
112 # pragma warning(pop)
114 //#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
116 #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP