📄 itkstringstream.cxx
字号:
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkStringStream.cxx,v $
Language: C++
Date: $Date: 2006-09-06 20:58:41 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkStringStream.h"
#include <iostream>
namespace itk
{
/**
* Default constructor. Use this to create a re-usable instance.
*/
StringStream::StringStream()
{
}
/**
* Destructor will set the result to the string value if an
* interpreter was provided to the constructor, and GetString() and
* Reset() were never called.
*/
StringStream::~StringStream()
{
}
/**
* Get the string that has been written to the stream. This disables
* further writing until Reset() is called.
*/
const char* StringStream::GetString()
{
m_String = this->str();
return m_String.c_str();
}
/**
* Reset the stream to accept new input starting from an empty string.
*/
void StringStream::Reset()
{
this->seekp(0, std::ios::beg);
}
} // namespace itk
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -