]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h
MFV r311477: xz 5.2.3.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBFileSpec.h
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 {
19 public:
20     SBFileSpec ();
21
22     SBFileSpec (const lldb::SBFileSpec &rhs);
23
24     SBFileSpec (const char *path);// Deprecated, use SBFileSpec (const char *path, bool resolve)
25
26     SBFileSpec (const char *path, bool resolve);
27
28     ~SBFileSpec ();
29
30     const SBFileSpec &
31     operator = (const lldb::SBFileSpec &rhs);
32
33     bool
34     IsValid() const;
35
36     bool
37     Exists () const;
38
39     bool
40     ResolveExecutableLocation ();
41
42     const char *
43     GetFilename() const;
44
45     const char *
46     GetDirectory() const;
47
48     void
49     SetFilename(const char *filename);
50     
51     void
52     SetDirectory(const char *directory);
53
54     uint32_t
55     GetPath (char *dst_path, size_t dst_len) const;
56
57     static int
58     ResolvePath (const char *src_path, char *dst_path, size_t dst_len);
59
60     bool
61     GetDescription (lldb::SBStream &description) const;
62
63     void
64     AppendPathComponent (const char *file_or_directory);
65
66 private:
67     friend class SBAttachInfo;
68     friend class SBBlock;
69     friend class SBCommandInterpreter;
70     friend class SBCompileUnit;
71     friend class SBDeclaration;
72     friend class SBFileSpecList;
73     friend class SBHostOS;
74     friend class SBLaunchInfo;
75     friend class SBLineEntry;
76     friend class SBModule;
77     friend class SBModuleSpec;
78     friend class SBPlatform;
79     friend class SBProcess;
80     friend class SBSourceManager;
81     friend class SBThread;
82     friend class SBTarget;
83
84     SBFileSpec (const lldb_private::FileSpec& fspec);
85
86     void
87     SetFileSpec (const lldb_private::FileSpec& fspec);
88
89     const lldb_private::FileSpec *
90     operator->() const;
91
92     const lldb_private::FileSpec *
93     get() const;
94
95     const lldb_private::FileSpec &
96     operator*() const;
97
98     const lldb_private::FileSpec &
99     ref() const;
100
101     std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
102 };
103
104
105 } // namespace lldb
106
107 #endif // LLDB_SBFileSpec_h_