Standard library header <strstream>

This header is part of the Input/Output library.


implements raw character array device
implements character array input operations
implements character array output operations
implements character array input/output operations


namespace std {
    class strstreambuf;
    class istrstream;
    class ostrstream;
    class strstream;

Class std::strstreambuf

class strstreambuf : public basic_streambuf<char> {
    explicit strstreambuf(streamsize alsize_arg = 0);
    strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
    strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
    strstreambuf(const char* gnext_arg, streamsize n);
    strstreambuf(signed char* gnext_arg, streamsize n, signed char* pbeg_arg = 0);
    strstreambuf(const signed char* gnext_arg, streamsize n);
    strstreambuf(unsigned char* gnext_arg, streamsize n, unsigned char* pbeg_arg = 0);
    strstreambuf(const unsigned char* gnext_arg, streamsize n);
    virtual ~strstreambuf();
    void freeze(bool freezefl = true);
    char* str();
    int pcount();
    virtual int_type overflow (int_type c = EOF);
    virtual int_type pbackfail(int_type c = EOF);
    virtual int_type underflow();
    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);
    virtual streambuf* setbuf(char* s, streamsize n);
    typedef /*bitmask type*/ strstate; // exposition only
    static const strstate allocated; // exposition only
    static const strstate constant; // exposition only
    static const strstate dynamic; // exposition only
    static const strstate frozen; // exposition only
    strstate strmode; // exposition only
    streamsize alsize; // exposition only
    void* (*palloc)(size_t); // exposition only
    void (*pfree)(void*); // exposition only

Class std::istrstream

class istrstream : public basic_istream<char> {
    explicit istrstream(const char* s);
    explicit istrstream(char* s);
    istrstream(const char* s, streamsize n);
    istrstream(char* s, streamsize n);
    virtual ~istrstream();
    strstreambuf* rdbuf() const;
    char *str();
    strstreambuf sb; // exposition only

Class std::ostrstream

class ostrstream : public basic_ostream<char> {
    ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
    virtual ~ostrstream();
    strstreambuf* rdbuf() const;
    void freeze(bool freezefl = true);
    char* str();
    int pcount() const;
    strstreambuf sb; // exposition only

Class std::strstream

class strstream : public basic_iostream<char> {
    // Types
    typedef char char_type;
    typedef typename char_traits<char>::int_type int_type;
    typedef typename char_traits<char>::pos_type pos_type;
    typedef typename char_traits<char>::off_type off_type;
    // constructors/destructor
    strstream(char* s, int n,
    ios_base::openmode mode = ios_base::in

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.