LLDB API Documentation

SBFileSpec.h
Go to the documentation of this file.
1 //===-- SBFileSpec.h --------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_SBFileSpec_h_
11 #define LLDB_SBFileSpec_h_
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class LLDB_API SBFileSpec {
18 public:
19  SBFileSpec();
20 
21  SBFileSpec(const lldb::SBFileSpec &rhs);
22 
23  SBFileSpec(const char *path); // Deprecated, use SBFileSpec (const char *path,
24  // bool resolve)
25 
26  SBFileSpec(const char *path, bool resolve);
27 
28  ~SBFileSpec();
29 
30  const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
31 
32  bool IsValid() const;
33 
34  bool Exists() const;
35 
36  bool ResolveExecutableLocation();
37 
38  const char *GetFilename() const;
39 
40  const char *GetDirectory() const;
41 
42  void SetFilename(const char *filename);
43 
44  void SetDirectory(const char *directory);
45 
46  uint32_t GetPath(char *dst_path, size_t dst_len) const;
47 
48  static int ResolvePath(const char *src_path, char *dst_path, size_t dst_len);
49 
50  bool GetDescription(lldb::SBStream &description) const;
51 
52  void AppendPathComponent(const char *file_or_directory);
53 
54 private:
55  friend class SBAttachInfo;
56  friend class SBBlock;
57  friend class SBCommandInterpreter;
58  friend class SBCompileUnit;
59  friend class SBDeclaration;
60  friend class SBFileSpecList;
61  friend class SBHostOS;
62  friend class SBLaunchInfo;
63  friend class SBLineEntry;
64  friend class SBModule;
65  friend class SBModuleSpec;
66  friend class SBPlatform;
67  friend class SBProcess;
68  friend class SBSourceManager;
69  friend class SBThread;
70  friend class SBTarget;
71 
72  SBFileSpec(const lldb_private::FileSpec &fspec);
73 
74  void SetFileSpec(const lldb_private::FileSpec &fspec);
75 
76  const lldb_private::FileSpec *operator->() const;
77 
78  const lldb_private::FileSpec *get() const;
79 
80  const lldb_private::FileSpec &operator*() const;
81 
82  const lldb_private::FileSpec &ref() const;
83 
84  std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
85 };
86 
87 } // namespace lldb
88 
89 #endif // LLDB_SBFileSpec_h_
class LLDB_API SBFileSpec
Definition: SBDefines.h:51