]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.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 SBFileSpec
18 {
19 public:
20     SBFileSpec ();
21
22     SBFileSpec (const lldb::SBFileSpec &rhs);
23
24     SBFileSpec (const char *path);// Deprected, 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 private:
64     friend class SBAttachInfo;
65     friend class SBBlock;
66     friend class SBCompileUnit;
67     friend class SBDeclaration;
68     friend class SBFileSpecList;
69     friend class SBHostOS;
70     friend class SBLaunchInfo;
71     friend class SBLineEntry;
72     friend class SBModule;
73     friend class SBModuleSpec;
74     friend class SBPlatform;
75     friend class SBProcess;
76     friend class SBSourceManager;
77     friend class SBThread;
78     friend class SBTarget;
79
80     SBFileSpec (const lldb_private::FileSpec& fspec);
81
82     void
83     SetFileSpec (const lldb_private::FileSpec& fspec);
84
85     const lldb_private::FileSpec *
86     operator->() const;
87
88     const lldb_private::FileSpec *
89     get() const;
90
91     const lldb_private::FileSpec &
92     operator*() const;
93
94     const lldb_private::FileSpec &
95     ref() const;
96
97     std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
98 };
99
100
101 } // namespace lldb
102
103 #endif // LLDB_SBFileSpec_h_