18 :
Stream(flags, addr_size, byte_order), m_packet() {}
27 m_packet.append(
static_cast<const char *
>(s), length);
41 const size_t length =
m_packet.size();
42 size_t last_line_begin_pos =
m_packet.find_last_of(
"\r\n");
43 if (last_line_begin_pos == std::string::npos) {
46 ++last_line_begin_pos;
47 return length - last_line_begin_pos;
54 const size_t length =
m_packet.size();
55 size_t last_line_begin_pos =
m_packet.find_last_of(
"\r\n");
56 if (last_line_begin_pos == std::string::npos) {
57 last_line_begin_pos = 0;
59 ++last_line_begin_pos;
62 const size_t line_columns = length - last_line_begin_pos;
63 if (column > line_columns) {
64 m_packet.append(column - line_columns, fill_char);
size_t WriteImpl(const void *s, size_t length) override
Output character bytes to the stream.
size_t GetSizeOfLastLine() const
void Flush() override
Flush the stream.
llvm::StringRef GetString() const
void FillLastLineToColumn(uint32_t column, char fill_char)
StreamString(bool colors=false)
A stream class that can stream formatted output to a file.
std::size_t m_bytes_written
Number of bytes written so far.
A class that represents a running process on the host machine.
ByteOrder
Byte ordering definitions.