Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:46

0001 //===-- StreamAsynchronousIO.h -----------------------------------*- C++-*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_CORE_STREAMASYNCHRONOUSIO_H
0010 #define LLDB_CORE_STREAMASYNCHRONOUSIO_H
0011 
0012 #include "lldb/Utility/Stream.h"
0013 
0014 #include <string>
0015 
0016 #include <cstddef>
0017 
0018 namespace lldb_private {
0019 class Debugger;
0020 
0021 class StreamAsynchronousIO : public Stream {
0022 public:
0023   StreamAsynchronousIO(Debugger &debugger, bool for_stdout, bool colors);
0024 
0025   ~StreamAsynchronousIO() override;
0026 
0027   void Flush() override;
0028 
0029 protected:
0030   size_t WriteImpl(const void *src, size_t src_len) override;
0031 
0032 private:
0033   Debugger &m_debugger;
0034   std::string m_data;
0035   bool m_for_stdout;
0036 };
0037 
0038 } // namespace lldb_private
0039 
0040 #endif // LLDB_CORE_STREAMASYNCHRONOUSIO_H