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
14namespace lldb {
15
17 friend class SBInstruction;
18 friend class SBInstructionList;
19 friend class SBDebugger;
21 friend class SBProcess;
22
23public:
24 SBFile();
25 SBFile(FileSP file_sp);
26#ifndef SWIG
27 SBFile(const SBFile &rhs);
28 SBFile(FILE *file, bool transfer_ownership);
29#endif
30 SBFile(int fd, const char *mode, bool transfer_ownership);
32
33 SBFile &operator=(const SBFile &rhs);
34
35 SBError Read(uint8_t *buf, size_t num_bytes, size_t *OUTPUT);
36 SBError Write(const uint8_t *buf, size_t num_bytes, size_t *OUTPUT);
37 SBError Flush();
38 bool IsValid() const;
39 SBError Close();
40
41 operator bool() const;
42#ifndef SWIG
43 bool operator!() const;
44#endif
45
46 FileSP GetFile() const;
47
48private:
50};
51
52} // namespace lldb
53
54#endif // LLDB_API_SBFILE_H
#define LLDB_API
Definition: SBDefines.h:26
FileSP m_opaque_sp
Definition: SBFile.h:49
Definition: SBAddress.h:15