LLDB  mainline
SBFile.h
Go to the documentation of this file.
1 //===-- SBFile.h --------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_API_SBFILE_H
10 #define LLDB_API_SBFILE_H
11 
12 #include "lldb/API/SBDefines.h"
13 
14 namespace lldb {
15 
17  friend class SBInstruction;
18  friend class SBInstructionList;
19  friend class SBDebugger;
20  friend class SBCommandReturnObject;
21  friend class SBProcess;
22 
23 public:
24  SBFile();
25  SBFile(FileSP file_sp);
26  SBFile(const SBFile &rhs);
27  SBFile(FILE *file, bool transfer_ownership);
28  SBFile(int fd, const char *mode, bool transfer_ownership);
29  ~SBFile();
30 
31  SBFile &operator=(const SBFile &rhs);
32 
33  SBError Read(uint8_t *buf, size_t num_bytes, size_t *bytes_read);
34  SBError Write(const uint8_t *buf, size_t num_bytes, size_t *bytes_written);
35  SBError Flush();
36  bool IsValid() const;
37  SBError Close();
38 
39  operator bool() const;
40  bool operator!() const;
41 
42  FileSP GetFile() const;
43 
44 private:
45  FileSP m_opaque_sp;
46 };
47 
48 } // namespace lldb
49 
50 #endif // LLDB_API_SBFILE_H
lldb::SBFile::m_opaque_sp
FileSP m_opaque_sp
Definition: SBFile.h:45
SBDefines.h
lldb::SBCommandReturnObject
Definition: SBCommandReturnObject.h:24
lldb::SBError
Definition: SBError.h:20
LLDB_API
#define LLDB_API
Definition: lldb-defines.h:23
lldb::SBProcess
Definition: SBProcess.h:23
lldb::SBInstructionList
Definition: SBInstructionList.h:18
lldb::SBFile
Definition: SBFile.h:16
lldb::SBDebugger
Definition: SBDebugger.h:34
lldb::SBFile
class LLDB_API SBFile
Definition: SBDefines.h:45
lldb::SBInstruction
Definition: SBInstruction.h:24
lldb
Definition: SBAddress.h:15