SBFileSpec.h revision 49306144bb37f0b3423d992f17cdcc24703374b4
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 15namespace lldb { 16 17class SBFileSpec 18{ 19public: 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 uint32_t 49 GetPath (char *dst_path, size_t dst_len) const; 50 51 static int 52 ResolvePath (const char *src_path, char *dst_path, size_t dst_len); 53 54 bool 55 GetDescription (lldb::SBStream &description) const; 56 57private: 58 friend class SBAttachInfo; 59 friend class SBBlock; 60 friend class SBCompileUnit; 61 friend class SBDeclaration; 62 friend class SBFileSpecList; 63 friend class SBHostOS; 64 friend class SBLaunchInfo; 65 friend class SBLineEntry; 66 friend class SBModule; 67 friend class SBProcess; 68 friend class SBSourceManager; 69 friend class SBThread; 70 friend class SBTarget; 71 72 void 73 SetFileSpec (const lldb_private::FileSpec& fs); 74 75 const lldb_private::FileSpec * 76 operator->() const; 77 78 const lldb_private::FileSpec * 79 get() const; 80 81 const lldb_private::FileSpec & 82 operator*() const; 83 84 const lldb_private::FileSpec & 85 ref() const; 86 87 std::auto_ptr <lldb_private::FileSpec> m_opaque_ap; 88}; 89 90 91} // namespace lldb 92 93#endif // LLDB_SBFileSpec_h_ 94