1 //===-- SBFileSpec.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBFileSpec_h_
11 #define LLDB_SBFileSpec_h_
13 #include "lldb/API/SBDefines.h"
17 class LLDB_API SBFileSpec {
21 SBFileSpec(const lldb::SBFileSpec &rhs);
23 SBFileSpec(const char *path); // Deprecated, use SBFileSpec (const char *path,
26 SBFileSpec(const char *path, bool resolve);
30 const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
36 bool ResolveExecutableLocation();
38 const char *GetFilename() const;
40 const char *GetDirectory() const;
42 void SetFilename(const char *filename);
44 void SetDirectory(const char *directory);
46 uint32_t GetPath(char *dst_path, size_t dst_len) const;
48 static int ResolvePath(const char *src_path, char *dst_path, size_t dst_len);
50 bool GetDescription(lldb::SBStream &description) const;
52 void AppendPathComponent(const char *file_or_directory);
55 friend class SBAttachInfo;
57 friend class SBCommandInterpreter;
58 friend class SBCompileUnit;
59 friend class SBDeclaration;
60 friend class SBFileSpecList;
61 friend class SBHostOS;
62 friend class SBInitializerOptions;
63 friend class SBLaunchInfo;
64 friend class SBLineEntry;
65 friend class SBModule;
66 friend class SBModuleSpec;
67 friend class SBPlatform;
68 friend class SBProcess;
69 friend class SBProcessInfo;
70 friend class SBSourceManager;
71 friend class SBTarget;
72 friend class SBThread;
74 SBFileSpec(const lldb_private::FileSpec &fspec);
76 void SetFileSpec(const lldb_private::FileSpec &fspec);
78 const lldb_private::FileSpec *operator->() const;
80 const lldb_private::FileSpec *get() const;
82 const lldb_private::FileSpec &operator*() const;
84 const lldb_private::FileSpec &ref() const;
86 std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
91 #endif // LLDB_SBFileSpec_h_