コード例 #1
0
void SimpleStreamBuf::str(const Aws::String& value)
{
    char* begin = m_buffer;
    char* end = begin + m_bufferSize;

    setp(begin, end);
    setg(begin, begin, begin);

    xsputn(value.c_str(), value.size());
}
コード例 #2
0
  int
  streambuf::sputn(const char* s, streamsize n)
  {
#if 0
    if (openedFor & ios_base::app)
      {
        seekoff(0, ios_base::end, ios_base::out);
      }
#endif
    return xsputn(s, n);
  }
コード例 #3
0
ファイル: xeXMLWriter.cpp プロジェクト: MIPS/external-deqp
int EscapeStreambuf::overflow (int ch)
{
	if (ch == -1)
		return -1;
	else
	{
		DE_ASSERT((ch & 0xff) == ch);
		const char chVal = (char)(deUint8)(ch & 0xff);
		return xsputn(&chVal, 1) == 1 ? ch : -1;
	}
}
コード例 #4
0
ファイル: sockstream.cpp プロジェクト: drescherjm/GDCM
std::streamsize sockbuf::xsputn (const char_type* s, std::streamsize n)
{
    std::streamsize wval = epptr () - pptr ();
    if (n <= wval) {
        memcpy (pptr (), s, (size_t)(n * sizeof (char_type)));
        pbump ((int)n);
        return n;
    }

    memcpy (pptr (), s, (size_t)(wval * sizeof (char_type)));
    pbump ((int)wval);

    if (overflow () != eof)
        return wval + xsputn (s + wval, n - wval);

    return wval;
}
コード例 #5
0
 // Hides base-class implementation to simplify multi-character insert without
 // a put area.
 std::streamsize sputn(const char_type* s, std::streamsize n) {
   return xsputn(s, n);
 }
コード例 #6
0
 int_type overflow(int_type __c)
 {
     return xsputn(reinterpret_cast<const char_type *>(&__c), 1) == 1 ? __c : traits_type::eof();
 }
コード例 #7
0
size_t lib::streambuf::sputn(const char* s, size_t n) {
	return xsputn(s, n);
}
コード例 #8
0
ファイル: iob.hpp プロジェクト: dplong/bitstream
	/**
		Put sequence of bits.

		\param[in] value Value of bit field.
		\param[in] size Number of bits in sequence of bits.
		\return Number of bits written to buffer or zero if error or eof.
	*/
	std::streamsize sputn(bitfield value, std::streamsize size)
	{
		return xsputn(value, size);
	}