1 //===-- StreamCallback.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_StreamCallback_h_
11 #define liblldb_StreamCallback_h_
13 #include "lldb/lldb-types.h"
14 #include "llvm/Support/raw_ostream.h"
16 #include <stddef.h> // for size_t
17 #include <stdint.h> // for uint64_t
19 namespace lldb_private {
21 class StreamCallback : public llvm::raw_ostream {
23 StreamCallback(lldb::LogOutputCallback callback, void *baton);
24 ~StreamCallback() override = default;
27 lldb::LogOutputCallback m_callback;
30 void write_impl(const char *Ptr, size_t Size) override;
31 uint64_t current_pos() const override;
34 } // namespace lldb_private
36 #endif // liblldb_StreamCallback_h