1 //===-- SBStream.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 LLDB_SBStream_h_
11 #define LLDB_SBStream_h_
15 #include "lldb/API/SBDefines.h"
30 // If this stream is not redirected to a file, it will maintain a local
31 // cache for the stream data which can be accessed using this accessor.
35 // If this stream is not redirected to a file, it will maintain a local
36 // cache for the stream output whose length can be accessed using this
42 Printf (const char *format, ...) __attribute__ ((format (printf, 2, 3)));
45 RedirectToFile (const char *path, bool append);
48 RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership);
51 RedirectToFileDescriptor (int fd, bool transfer_fh_ownership);
53 // If the stream is redirected to a file, forget about the file and if
54 // ownership of the file was transfered to this object, close the file.
55 // If the stream is backed by a local cache, clear this cache.
60 friend class SBAddress;
62 friend class SBBreakpoint;
63 friend class SBBreakpointLocation;
64 friend class SBCommandReturnObject;
65 friend class SBCompileUnit;
67 friend class SBDebugger;
68 friend class SBDeclaration;
70 friend class SBFileSpec;
71 friend class SBFileSpecList;
73 friend class SBFunction;
74 friend class SBInstruction;
75 friend class SBInstructionList;
76 friend class SBLineEntry;
77 friend class SBModule;
78 friend class SBModuleSpec;
79 friend class SBModuleSpecList;
80 friend class SBProcess;
81 friend class SBSection;
82 friend class SBSourceManager;
83 friend class SBSymbol;
84 friend class SBSymbolContext;
85 friend class SBSymbolContextList;
86 friend class SBTarget;
87 friend class SBThread;
89 friend class SBTypeMember;
91 friend class SBWatchpoint;
93 lldb_private::Stream *
96 lldb_private::Stream *
99 lldb_private::Stream &
104 DISALLOW_COPY_AND_ASSIGN (SBStream);
105 std::unique_ptr<lldb_private::Stream> m_opaque_ap;
111 #endif // LLDB_SBStream_h_