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 SBLaunchInfo;
63 friend class SBLineEntry;
64 friend class SBModule;
65 friend class SBModuleSpec;
66 friend class SBPlatform;
67 friend class SBProcess;
68 friend class SBProcessInfo;
69 friend class SBSourceManager;
70 friend class SBThread;
71 friend class SBTarget;
73 SBFileSpec(const lldb_private::FileSpec &fspec);
75 void SetFileSpec(const lldb_private::FileSpec &fspec);
77 const lldb_private::FileSpec *operator->() const;
79 const lldb_private::FileSpec *get() const;
81 const lldb_private::FileSpec &operator*() const;
83 const lldb_private::FileSpec &ref() const;
85 std::unique_ptr<lldb_private::FileSpec> m_opaque_ap;
90 #endif // LLDB_SBFileSpec_h_