当前位置: 首页>>代码示例>>C++>>正文


C++ stream_type::write方法代码示例

本文整理汇总了C++中stream_type::write方法的典型用法代码示例。如果您正苦于以下问题:C++ stream_type::write方法的具体用法?C++ stream_type::write怎么用?C++ stream_type::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在stream_type的用法示例。


在下文中一共展示了stream_type::write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: flush

			std::pair<uint64_t,uint64_t> flush(stream_type & out)
			{
				uint64_t const start = out.tellp();

				if ( pc != pa )
				{
					std::sort(pa,pc);
					out.write(reinterpret_cast<char const *>(pa),(pc-pa)*sizeof(element_type));
					pc = pa;
				}

				uint64_t const end = out.tellp();

				return std::pair<uint64_t,uint64_t>(start,end);
			}
开发者ID:gt1,项目名称:libmaus2,代码行数:15,代码来源:Buffer.hpp

示例2: operator

        result_type operator() (stream_type& strm, value_type const& value) const
        {
            if (value.type == attributes::named_scope_entry::function)
            {
                const char* begin = value.scope_name.c_str();
                const char* end = begin + value.scope_name.size();
                if (parse_function_name(begin, end, m_include_scope))
                {
                    strm.write(begin, end - begin);
                    return;
                }
            }

            strm << value.scope_name;
        }
开发者ID:ElaraFX,项目名称:boost,代码行数:15,代码来源:named_scope_format_parser.cpp

示例3:

 /**
     writes the current cached contents to a stream
 */
 template<class stream_type> void to_stream(stream_type & stream) const {
     stream.write( m_str.begin() + m_reserve_prepend, m_str.size() - m_reserve_prepend - m_reserve_append);
 }
开发者ID:NOMORECOFFEE,项目名称:hpx,代码行数:6,代码来源:optimize.hpp


注:本文中的stream_type::write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。