⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringstream.h

📁 Amis - A maximum entropy estimator 一个最大熵模型统计工具
💻 H
字号:
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: StringStream.h,v 1.4 2003/04/24 08:29:36 kazama Exp $///  <collection>Maximum Entropy Estimator</collection>///  <name>StringStream.h</name>///  <overview>Wrapper class for stringstream</overview>///  <desc>///  This file provides a wrapper class for stringstream.///  When stringstream is not installed, strstream is used.///  </desc>/////////////////////////////////////////////////////////////////////////#ifndef Amis_StringStream_h_#define Amis_StringStream_h_#include <amis/configure.h>#ifdef HAVE_SSTREAM#include <sstream>#else // HAVE_SSTREAM#include <strstream>#endif // HAVE_SSTREAM#include <iostream>AMIS_NAMESPACE_BEGIN#ifdef HAVE_SSTREAMclass IStringStream : public std::istringstream{	public:	IStringStream( const char* s ) : std::istringstream( s ) { }	IStringStream( const std::string& s ) : std::istringstream( s ) { }};#elseclass IStringStream : public std::istrstream{	public:	IStringStream( const char* s ) : std::istrstream( s ) { }	IStringStream( const std::string& s ) : std::istrstream( s ) { }};#endifclass OStringStream : #ifdef HAVE_SSTREAMpublic std::ostringstream#elsepublic std::ostrstream#endif{public:  OStringStream( void ) {}  ~OStringStream() {#ifndef HAVE_SSTREAM    freeze( false );#endif // HAVE_SSTREAM  }#ifndef HAVE_SSTREAMpublic:  std::string str( void ) {    (*this) << std::ends;    return std::string( std::ostrstream::str() );  }#endif // HAVE_SSTREAM};AMIS_NAMESPACE_END#endif // Amis_StringStream_h_// end of StringStream.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -