Ejemplo n.º 1
0
ostream& ostream::operator=(streambuf * _sbuf)
{
    if (delbuf() && rdbuf())
        delete rdbuf();

    bp = 0;

    this->ios::operator=(ios());    // initialize ios members
    delbuf(0);                      // important!
    init(_sbuf);

    return *this;
}
        ostrstream::ostrstream(char * str, int size, int mode)
: ostream(_new_crt strstreambuf(str,size,str))
{
    delbuf(1);
    if (mode & (ios::app|ios::ate))
        seekp(strlen(str),ios::beg);
}
Ejemplo n.º 3
0
ALEditControlStream::~ALEditControlStream()
{
    mpControlStream.sync();
#ifdef AL_MICROSOFT
    delbuf();
#endif
}
        ostrstream::ostrstream()
: ostream(_new_crt strstreambuf)
{
    delbuf(1);
}
        istrstream::istrstream(char * pStr, int len)
: istream(_new_crt strstreambuf(pStr,len))
{
    delbuf(1);
}
        istrstream::istrstream(char * pszStr)
: istream(_new_crt strstreambuf(pszStr,0))
{
    delbuf(1);
}