ostreamoutputbuffer.cc

来自「c语言编写的xml解析器可以方便的遍历插入删除节点等操作的」· CC 代码 · 共 42 行

CC
42
字号
/* document.h * this file is part of libxml++ * * copyright (C) 2003 by libxml++ developer's team * * this file is covered by the GNU Lesser General Public License, * which should be included with libxml++ as the file COPYING. */#include <libxml++/io/ostreamoutputbuffer.h>namespace xmlpp{  OStreamOutputBuffer::OStreamOutputBuffer(      std::ostream & output,      const std::string& encoding)    : OutputBuffer(encoding), output_(output)  {  }  OStreamOutputBuffer::~OStreamOutputBuffer()  {  }    bool OStreamOutputBuffer::do_write(      const char * buffer,      int len)  {    // here we rely on the ostream implicit conversion to boolean, to know if the stream can be used and/or if the write succeded.    if(output_)      output_.write(buffer, len);    return output_;  }  bool OStreamOutputBuffer::do_close()  {    if(output_)        output_.flush();    return output_;  }};

⌨️ 快捷键说明

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