/usr/include/boost/archive/impl
NameSizeModeActions
archive_serializer_map.ipp23470644editdlrm
basic_binary_iarchive.ipp43620644editdlrm
basic_binary_iprimitive.ipp50970644editdlrm
basic_binary_oarchive.ipp13040644editdlrm
basic_binary_oprimitive.ipp37350644editdlrm
basic_text_iarchive.ipp25350644editdlrm
basic_text_iprimitive.ipp35100644editdlrm
basic_text_oarchive.ipp16750644editdlrm
basic_text_oprimitive.ipp29610644editdlrm
basic_xml_grammar.hpp51410644editdlrm
basic_xml_iarchive.ipp35530644editdlrm
basic_xml_oarchive.ipp76730644editdlrm
text_iarchive_impl.ipp30950644editdlrm
text_oarchive_impl.ipp28840644editdlrm
text_wiarchive_impl.ipp28020644editdlrm
text_woarchive_impl.ipp21550644editdlrm
xml_iarchive_impl.ipp57130644editdlrm
xml_oarchive_impl.ipp40640644editdlrm
xml_wiarchive_impl.ipp52450644editdlrm
xml_woarchive_impl.ipp46470644editdlrm
Edit: /usr/include/boost/archive/impl/basic_binary_oprimitive.ipp (3735B)
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_binary_oprimitive.ipp: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, documentation, and revision history. #include #include // NULL #include #include #if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) namespace std{ using ::strlen; } // namespace std #endif #ifndef BOOST_NO_CWCHAR #include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::wcslen; } #endif #endif #include #include namespace boost { namespace archive { ////////////////////////////////////////////////////////////////////// // implementation of basic_binary_oprimitive template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::init() { // record native sizes of fundamental types // this is to permit detection of attempts to pass // native binary archives accross incompatible machines. // This is not foolproof but its better than nothing. this->This()->save(static_cast(sizeof(int))); this->This()->save(static_cast(sizeof(long))); this->This()->save(static_cast(sizeof(float))); this->This()->save(static_cast(sizeof(double))); // for checking endianness this->This()->save(int(1)); } template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const char * s) { std::size_t l = std::strlen(s); this->This()->save(l); save_binary(s, l); } template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const std::string &s) { std::size_t l = static_cast(s.size()); this->This()->save(l); save_binary(s.data(), l); } #ifndef BOOST_NO_CWCHAR #ifndef BOOST_NO_INTRINSIC_WCHAR_T template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const wchar_t * ws) { std::size_t l = std::wcslen(ws); this->This()->save(l); save_binary(ws, l * sizeof(wchar_t) / sizeof(char)); } #endif #ifndef BOOST_NO_STD_WSTRING template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const std::wstring &ws) { std::size_t l = ws.size(); this->This()->save(l); save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char)); } #endif #endif // BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive::basic_binary_oprimitive( std::basic_streambuf & sb, bool no_codecvt ) : #ifndef BOOST_NO_STD_LOCALE m_sb(sb), codecvt_null_facet(1), locale_saver(m_sb), archive_locale(sb.getloc(), & codecvt_null_facet) { if(! no_codecvt){ m_sb.pubsync(); m_sb.pubimbue(archive_locale); } } #else m_sb(sb) {} #endif // scoped_ptr requires that g be a complete type at time of // destruction so define destructor here rather than in the header template BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive::~basic_binary_oprimitive(){} } // namespace archive } // namespace boost