首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

sstream

此标头是输入/输出图书馆。

*。

基本[医]实现原始字符串设备%28类模板%29

基本[医]实现高级字符串流输入操作%28类模板%29

基本[医]实现高级字符串流输出操作%28类模板%29

基本[医]实现高级字符串流输入/输出操作%28类模板%29

台培

弦基[医]弦乐<char>

wstrabuf基[医]字符串<wchar[医]T>

基本流[医]迎风流<char>

维斯内流基[医]毒气流<wchar[医]T>

沙丁溪基[医]细流<char>

黄溪基[医]卵细流<wchar[医]T>

串基[医]串流<char>

Wstring流基[医]字符串<wchar[医]T>

功能

STD::交换%28 std::basic[医]string buf%29%28C++11%29专门使用std::swp算法%28函数模板%29

STD::交换%28 std::basic[医]Stingstream%29%28C++11%29专门开发std::交换算法%28函数模板%29

STD::交换%28 std::basic[医]Stingstream%29%28C++11%29专门开发std::交换算法%28函数模板%29

STD::交换%28 std::basic[医]Stingstream%29%28C++11%29专门开发std::交换算法%28函数模板%29

简介

二次

代码语言:javascript
复制
namespace std {
 
    template <class charT,
              class traits = char_traits<charT>,
              class Allocator = allocator<charT> >
        class basic_stringbuf;
    typedef basic_stringbuf<char> stringbuf;
    typedef basic_stringbuf<wchar_t> wstringbuf;
    template <class charT, class traits, class Allocator>
        void swap(basic_stringbuf<charT, traits, Allocator>& x,
                  basic_stringbuf<charT, traits, Allocator>& y);
 
    template <class charT,
              class traits = char_traits<charT>,
              class Allocator = allocator<charT> >
        class basic_istringstream;
    typedef basic_istringstream<char> istringstream;
    typedef basic_istringstream<wchar_t> wistringstream;
    template <class charT, class traits, class Allocator>
        void swap(basic_istringstream<charT, traits, Allocator>& x,
                  basic_istringstream<charT, traits, Allocator>& y);
 
    template <class charT,
              class traits = char_traits<charT>,
              class Allocator = allocator<charT> >
        class basic_ostringstream;
    typedef basic_ostringstream<char> ostringstream;
    typedef basic_ostringstream<wchar_t> wostringstream;
    template <class charT, class traits, class Allocator>
        void swap(basic_ostringstream<charT, traits, Allocator>& x,
                  basic_ostringstream<charT, traits, Allocator>& y);
 
    template <class charT,
              class traits = char_traits<charT>,
              class Allocator = allocator<charT> >
        class basic_stringstream;
    typedef basic_stringstream<char> stringstream;
    typedef basic_stringstream<wchar_t> wstringstream;
    template <class charT, class traits, class Allocator>
        void swap(basic_stringstream<charT, traits, Allocator>& x,
                  basic_stringstream<charT, traits, Allocator>& y);
}

二次

std::basic_stringbuf

二次

代码语言:javascript
复制
template <class charT,
          class traits = char_traits<charT>,
          class Allocator = allocator<charT> >
class basic_stringbuf : public basic_streambuf<charT,traits> {
 public:
    typedef charT char_type;
    typedef typename traits::int_type int_type;
    typedef typename traits::pos_type pos_type;
    typedef typename traits::off_type off_type;
    typedef traits traits_type;
    typedef Allocator allocator_type;
 
    // Constructors:
    explicit basic_stringbuf(ios_base::openmode which = ios_base::in|ios_base::out);
    explicit basic_stringbuf(const basic_string<charT,traits,Allocator>& str,
                             ios_base::openmode which = ios_base::in|ios_base::out);
    basic_stringbuf(const basic_stringbuf& rhs) = delete;
    basic_stringbuf(basic_stringbuf&& rhs);
 
    // Assign and swap:
    basic_stringbuf& operator=(const basic_stringbuf& rhs) = delete;
    basic_stringbuf& operator=(basic_stringbuf&& rhs);
    void swap(basic_stringbuf& rhs);
 
    // Get and set:
    basic_string<charT,traits,Allocator> str() const;
    void str(const basic_string<charT,traits,Allocator>& s);
 
 protected:
    // Overridden virtual functions:
    virtual int_type underflow();
    virtual int_type pbackfail(int_type c = traits::eof());
    virtual int_type overflow (int_type c = traits::eof());
    virtual basic_streambuf<charT,traits>* setbuf(charT*, streamsize);
    virtual pos_type seekoff(off_type off, ios_base::seekdir way,
                             ios_base::openmode which = ios_base::in|ios_base::out);
    virtual pos_type seekpos(pos_type sp,
                             ios_base::openmode which = ios_base::in|ios_base::out);
 
 private:
    ios_base::openmode mode; // exposition only
};

二次

std::basic_istringstream

二次

代码语言:javascript
复制
template <class charT,
          class traits = char_traits<charT>,
          class Allocator = allocator<charT> >
class basic_istringstream : public basic_istream<charT,traits> {
 public:
    typedef charT char_type;
    typedef typename traits::int_type int_type;
    typedef typename traits::pos_type pos_type;
    typedef typename traits::off_type off_type;
    typedef traits traits_type;
    typedef Allocator allocator_type;
 
    // Constructors:
    explicit basic_istringstream(ios_base::openmode which = ios_base::in);
    explicit basic_istringstream(const basic_string<charT,traits,Allocator>& str,
                                 ios_base::openmode which = ios_base::in);
    basic_istringstream(const basic_istringstream& rhs) = delete;
    basic_istringstream(basic_istringstream&& rhs);
 
    // Assign and swap:
    basic_istringstream& operator=(const basic_istringstream& rhs) = delete;
    basic_istringstream& operator=(basic_istringstream&& rhs);
    void swap(basic_istringstream& rhs);
 
    // Members:
    basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
    basic_string<charT,traits,Allocator> str() const;
    void str(const basic_string<charT,traits,Allocator>& s);
 
 private:
    basic_stringbuf<charT,traits,Allocator> sb; // exposition only
};

二次

std::basic_ostringstream

二次

代码语言:javascript
复制
template <class charT,
          class traits = char_traits<charT>,
          class Allocator = allocator<charT> >
class basic_ostringstream : public basic_ostream<charT,traits> {
 public:
    // types:
    typedef charT char_type;
    typedef typename traits::int_type int_type;
    typedef typename traits::pos_type pos_type;
    typedef typename traits::off_type off_type;
    typedef traits traits_type;
    typedef Allocator allocator_type;
 
    // Constructors/destructor:
    explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
    explicit basic_ostringstream(const basic_string<charT,traits,Allocator>& str,
                                 ios_base::openmode which = ios_base::out);
     basic_ostringstream(const basic_ostringstream& rhs) = delete;
     basic_ostringstream(basic_ostringstream&& rhs);
 
    // Assign/swap:
    basic_ostringstream& operator=(const basic_ostringstream& rhs) = delete;
    basic_ostringstream& operator=(basic_ostringstream&& rhs);
    void swap(basic_ostringstream& rhs);
 
    // Members:
    basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
    basic_string<charT,traits,Allocator> str() const;
    void str(const basic_string<charT,traits,Allocator>& s);
 
 private:
    basic_stringbuf<charT,traits,Allocator> sb; // exposition only
};

二次

std::basic_stringstream

二次

代码语言:javascript
复制
template <class charT,
          class traits = char_traits<charT>,
          class Allocator = allocator<charT> >
class basic_stringstream : public basic_iostream<charT,traits> {
 public:
    // types:
    typedef charT char_type;
    typedef typename traits::int_type int_type;
    typedef typename traits::pos_type pos_type;
    typedef typename traits::off_type off_type;
    typedef traits traits_type;
    typedef Allocator allocator_type;
 
    // constructors/destructor
    explicit basic_stringstream(ios_base::openmode which = ios_base::out|ios_base::in);
    explicit basic_stringstream(const basic_string<charT,traits,Allocator>& str,
                                ios_base::openmode which = ios_base::out|ios_base::in);
    basic_stringstream(const basic_stringstream& rhs) = delete;
    basic_stringstream(basic_stringstream&& rhs);
 
    // Assign/swap:
    basic_stringstream& operator=(const basic_stringstream& rhs) = delete;
    basic_stringstream& operator=(basic_stringstream&& rhs);
    void swap(basic_stringstream& rhs);
 
    // Members:
    basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
    basic_string<charT,traits,Allocator> str() const;
    void str(const basic_string<charT,traits,Allocator>& str);
 
 private:
    basic_stringbuf<charT, traits> sb; // exposition only
};

二次

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com