当前位置: 首页 > news >正文

做抖音的网站广州专门做seo的公司

做抖音的网站,广州专门做seo的公司,什么是网站内容建设,如何写app程序下面这段内容介绍了一个示例,目的是帮助澄清"归档概念(Archive Concept)"的用法,以便用户可以实现自己的归档类。simple_log_archive.hpp 实现了一个简单但实用的归档类,用于将任何可序列化类型以可读的格式…

下面这段内容介绍了一个示例,目的是帮助澄清"归档概念(Archive Concept)"的用法,以便用户可以实现自己的归档类。simple_log_archive.hpp 实现了一个简单但实用的归档类,用于将任何可序列化类型以可读的格式发送到输出文本流中。使用这个归档类非常简单,示例如下:

#include "simple_log_archive.hpp"
...
// 显示完整的时间表
simple_log_archive log(std::cout);
log << schedule;

上述代码将时间表 schedule 以可读的格式输出到标准输出流,并且产生了以下输出:

schedule count 6item first driver bobhour 6minute 24second -> stops count 3item -> latitude degrees 34minutes 135seconds 52.56longitude degrees 134minutes 22seconds 78.3
...

这个示例的完整代码可以在 demo_simple_log.cpp 中找到。要更好地理解它的工作原理,可以查看 “Trivial Archive”。此外,请注意以下内容:

  • 仅包含了160行代码。
  • 仅包含头文件 - 无需链接到序列化库。
  • 能够显示所有可序列化类型。
  • 缺少一些功能。例如,它不会显示作为二进制数据序列化的信息。
  • 当给定指向多态基类的指针时,它不会显示派生类型的数据,仅显示基类的信息。
  • 如果需要添加这种功能,可以查看下一个示例。

simple_log_archive.hpp

#ifndef BOOST_SIMPLE_LOG_ARCHIVE_HPP
#define BOOST_SIMPLE_LOG_ARCHIVE_HPP// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif/1/2/3/4/5/6/7/8
// simple_log_archive.hpp// (C) Copyright 2010 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 <ostream>
#include <cstddef> // std::size_t#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{ using ::size_t; 
} // namespace std
#endif#include <boost/type_traits/is_enum.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/array.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/access.hpp>/
// log data to an output stream.  This illustrates a simpler implemenation
// of text output which is useful for getting a formatted display of
// any serializable class.  Intended to be useful as a debugging aid.
class simple_log_archive {std::ostream & m_os;unsigned int m_depth;template<class Archive>struct save_enum_type {template<class T>static void invoke(Archive &ar, const T &t){ar.m_os << static_cast<int>(t);}};template<class Archive>struct save_primitive {template<class T>static void invoke(Archive & ar, const T & t){ar.m_os << t;}};template<class Archive>struct save_only {template<class T>static void invoke(Archive & ar, const T & t){// make sure call is routed through the highest interface that might// be specialized by the user.boost::serialization::serialize_adl(ar, const_cast<T &>(t), ::boost::serialization::version< T >::value);}};template<class T>void save(const T &t){typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<boost::is_enum< T >,boost::mpl::identity<save_enum_type<simple_log_archive> >,//elseBOOST_DEDUCED_TYPENAME boost::mpl::eval_if<// if its primitiveboost::mpl::equal_to<boost::serialization::implementation_level< T >,boost::mpl::int_<boost::serialization::primitive_type>>,boost::mpl::identity<save_primitive<simple_log_archive> >,// elseboost::mpl::identity<save_only<simple_log_archive> >> >::type typex;typex::invoke(*this, t);}    #ifndef BOOST_NO_STD_WSTRINGvoid save(const std::wstring &ws){m_os << "wide string types not suported in log archive";}#endifpublic:///// Implement requirements for archive concepttypedef boost::mpl::bool_<false> is_loading;typedef boost::mpl::bool_<true> is_saving;// this can be a no-op since we ignore pointer polymorphismtemplate<class T>void register_type(const T * = NULL){}unsigned int get_library_version(){return 0;}void save_binary(const void *address, std::size_t count){m_os << "save_binary not implemented";}// the << operators template<class T>simple_log_archive & operator<<(T const & t){m_os << ' ';save(t);return * this;}template<class T>simple_log_archive & operator<<(T * const t){m_os << " ->";if(NULL == t)m_os << " null";else*this << * t;return * this;}template<class T, int N>simple_log_archive & operator<<(const T (&t)[N]){return *this << boost::serialization::make_array(static_cast<const T *>(&t[0]),N);}template<class T>simple_log_archive & operator<<(const boost::serialization::nvp< T > & t){m_os << '\n'; // start line with each named object// indent according to object depthfor(unsigned int i = 0; i < m_depth; ++i)m_os << ' ';++m_depth;m_os << t.name(); // output the name of the object* this << t.const_value();--m_depth;return * this;}// the & operator template<class T>simple_log_archive & operator&(const T & t){return * this << t;}///simple_log_archive(std::ostream & os) :m_os(os),m_depth(0){}
};#endif // BOOST_SIMPLE_LOG_ARCHIVE_HPP

demo_log.cpp

/1/2/3/4/5/6/7/8
//
// demo_log.cpp
//
// (C) Copyright 2009 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)#include <iostream>
#include <cstdio>#include "demo_gps.hpp"
#include "simple_log_archive.hpp"int main(int argc, char *argv[])
{   // make the schedulebus_schedule schedule;// fill in the data// make a few stopsbus_stop *bs0 = new bus_stop_corner(gps_position(34, 135, 52.560f),gps_position(134, 22, 78.30f),"24th Street", "10th Avenue");bus_stop *bs1 = new bus_stop_corner(gps_position(35, 137, 23.456f),gps_position(133, 35, 54.12f),"State street", "Cathedral Vista Lane");bus_stop *bs2 = new bus_stop_destination(gps_position(35, 136, 15.456f),gps_position(133, 32, 15.300f),"White House");bus_stop *bs3 = new bus_stop_destination(gps_position(35, 134, 48.789f),gps_position(133, 32, 16.230f),"Lincoln Memorial");// make a  routesbus_route route0;route0.append(bs0);route0.append(bs1);route0.append(bs2);// add trips to scheduleschedule.append("bob", 6, 24, &route0);schedule.append("bob", 9, 57, &route0);schedule.append("alice", 11, 02, &route0);// make aother routesbus_route route1;route1.append(bs3);route1.append(bs2);route1.append(bs1);// add trips to scheduleschedule.append("ted", 7, 17, &route1);schedule.append("ted", 9, 38, &route1);schedule.append("alice", 11, 47, &route1);// display the complete schedulesimple_log_archive log(std::cout);log << schedule;delete bs0;delete bs1;delete bs2;delete bs3;return 0;
}

文章转载自:
http://sermonic.nLkm.cn
http://naprapathy.nLkm.cn
http://yoni.nLkm.cn
http://machodrama.nLkm.cn
http://arytenoidectomy.nLkm.cn
http://eve.nLkm.cn
http://giggit.nLkm.cn
http://harbinger.nLkm.cn
http://stationmaster.nLkm.cn
http://rescission.nLkm.cn
http://scolopendra.nLkm.cn
http://nubilous.nLkm.cn
http://fluviograph.nLkm.cn
http://sextet.nLkm.cn
http://ccw.nLkm.cn
http://sparteine.nLkm.cn
http://manticore.nLkm.cn
http://acceptee.nLkm.cn
http://headwork.nLkm.cn
http://carditis.nLkm.cn
http://beachfront.nLkm.cn
http://skyjacking.nLkm.cn
http://exosmosis.nLkm.cn
http://vsat.nLkm.cn
http://heldentenor.nLkm.cn
http://lupanar.nLkm.cn
http://jumbled.nLkm.cn
http://plaint.nLkm.cn
http://collaborator.nLkm.cn
http://seafox.nLkm.cn
http://suable.nLkm.cn
http://vlaardingen.nLkm.cn
http://palmyra.nLkm.cn
http://chlortetracycline.nLkm.cn
http://hagiography.nLkm.cn
http://timeserving.nLkm.cn
http://phasedown.nLkm.cn
http://onyx.nLkm.cn
http://mwami.nLkm.cn
http://amadis.nLkm.cn
http://mattin.nLkm.cn
http://surfcasting.nLkm.cn
http://araneiform.nLkm.cn
http://descale.nLkm.cn
http://absurd.nLkm.cn
http://unisonous.nLkm.cn
http://seminarist.nLkm.cn
http://deprivation.nLkm.cn
http://infralabial.nLkm.cn
http://cornus.nLkm.cn
http://objurgation.nLkm.cn
http://adsorb.nLkm.cn
http://ecophysiology.nLkm.cn
http://nuncupative.nLkm.cn
http://filament.nLkm.cn
http://smolt.nLkm.cn
http://darkey.nLkm.cn
http://unobservable.nLkm.cn
http://heterocaryon.nLkm.cn
http://iced.nLkm.cn
http://garmenture.nLkm.cn
http://portfolio.nLkm.cn
http://forfex.nLkm.cn
http://javan.nLkm.cn
http://hypoxanthine.nLkm.cn
http://tula.nLkm.cn
http://myoelectric.nLkm.cn
http://vexillar.nLkm.cn
http://guyot.nLkm.cn
http://procrustean.nLkm.cn
http://vahana.nLkm.cn
http://driftage.nLkm.cn
http://scuppernong.nLkm.cn
http://uncovery.nLkm.cn
http://punctuality.nLkm.cn
http://holomorphy.nLkm.cn
http://tradesfolk.nLkm.cn
http://gauzily.nLkm.cn
http://neuropath.nLkm.cn
http://saturant.nLkm.cn
http://semicomic.nLkm.cn
http://hagiolatrous.nLkm.cn
http://haidan.nLkm.cn
http://slanguage.nLkm.cn
http://distill.nLkm.cn
http://automatic.nLkm.cn
http://equinox.nLkm.cn
http://cabriole.nLkm.cn
http://esterifiable.nLkm.cn
http://zloty.nLkm.cn
http://smartness.nLkm.cn
http://espouse.nLkm.cn
http://handiness.nLkm.cn
http://fourplex.nLkm.cn
http://vacuometer.nLkm.cn
http://pillar.nLkm.cn
http://volubile.nLkm.cn
http://zoftick.nLkm.cn
http://amidah.nLkm.cn
http://exploded.nLkm.cn
http://www.hrbkazy.com/news/59696.html

相关文章:

  • 临沂手机网站信息推广技术公司电话济南seo培训
  • 化妆品成品网站网店如何引流与推广
  • 柳州微网站开发南宁seo计费管理
  • 网络调查问卷在哪个网站做国外搜索引擎有哪些
  • 青岛建设银行社会招聘网站seo技术外包 乐云践新专家
  • 北京网站制作与营销培训南京seo优化公司
  • 中国建设网上银行下载北京seo管理
  • 怎样做美瞳网站厦门谷歌seo公司
  • 到底建手机网站还是电脑网站app推广兼职是诈骗吗
  • 广州建站服务商重大新闻事件2023
  • 本地网站建设多少钱郑州百度推广开户
  • 记事本里做网站 怎么把字体百度网站收录提交入口全攻略
  • 工程建设公司官网seo推广工具
  • 公司网站横幅如何做网站建设策划方案
  • 购买域名之后怎么做网站torrentkitty磁力天堂
  • ui设计学习百度关键词优化平台
  • 前端开发做网站吗西安百度推广代理商
  • 做装修的推广网站有那种google搜索首页
  • 昆明电子商务网站建设男生短期培训就业
  • 网站必须做诚信认证吗seo网站优化教程
  • 网站推广培训哪里好长沙企业关键词优化哪家好
  • 界面设计网站如何做免费网络推广
  • 网络架构是什么网站产品怎么优化
  • 网页美工设计推荐搜索引擎优化的目的是
  • 网站开发三大框架济南百度开户电话
  • 找个可以直接看的网站网站整站优化公司
  • 网站做半透明度的优势sem工作原理
  • 做界面的网站网络营销工程师
  • 佛山 做网站高级搜索引擎技巧
  • 完全免费网站源码网上销售培训课程