// testSerialize.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <map>
#include <sstream>
#include <string>
#include <iostream>
#include <fstream>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
// XML archive which uses wide characters (use for UTF-8 output ),
// defines boost::archive::xml_woarchive
// and boost::archive::xml_wiarchive
#include <boost/archive/xml_woarchive.hpp>
#include <boost/archive/xml_wiarchive.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/locale.hpp>
using namespace boost::locale;
/*
标题:std::map容器序列化、反序列化测试
Author:kagula
Date:2014-09-16
测试环境
[1]Visual Studio 2013 Update3、boost 1.56
将来:
完善测试用例
*/
namespace lijun
{
class CPersistentLayer
{
private:
friend class boost::serialization::access;
template<class
std::map容器序列化、反序列化测试
最新推荐文章于 2024-08-05 03:50:58 发布
这篇博客介绍了如何在C++中使用Boost库对std::map容器进行XML序列化和反序列化操作,通过CPersistentLayer类展示了具体的实现过程,并提供了测试用例。
摘要由CSDN通过智能技术生成