LLDB  mainline
CFCString.h
Go to the documentation of this file.
1 //===-- CFCString.h ---------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H
10 #define LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H
11 
12 #include <iosfwd>
13 
14 #include "CFCReleaser.h"
15 
16 class CFCString : public CFCReleaser<CFStringRef> {
17 public:
18  // Constructors and Destructors
19  CFCString(CFStringRef cf_str = NULL);
20  CFCString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
21  CFCString(const CFCString &rhs);
22  CFCString &operator=(const CFCString &rhs);
23  virtual ~CFCString();
24 
25  const char *GetFileSystemRepresentation(std::string &str);
26  CFStringRef SetFileSystemRepresentation(const char *path);
27  CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type);
28  CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path);
29  const char *UTF8(std::string &str);
30  CFIndex GetLength() const;
31  static const char *UTF8(CFStringRef cf_str, std::string &str);
32  static const char *FileSystemRepresentation(CFStringRef cf_str,
33  std::string &str);
34  static const char *ExpandTildeInPath(const char *path,
35  std::string &expanded_path);
36 };
37 
38 #endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H
CFCString::SetFileSystemRepresentationFromCFType
CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type)
Definition: CFCString.cpp:51
CFCString
Definition: CFCString.h:16
CFCReleaser
CFCString::SetFileSystemRepresentation
CFStringRef SetFileSystemRepresentation(const char *path)
Definition: CFCString.cpp:41
CFCString::ExpandTildeInPath
static const char * ExpandTildeInPath(const char *path, std::string &expanded_path)
Definition: CFCString.cpp:108
CFCReleaser.h
CFCString::SetFileSystemRepresentationAndExpandTilde
CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path)
Definition: CFCString.cpp:69
CFCString::operator=
CFCString & operator=(const CFCString &rhs)
Definition: CFCString.cpp:20
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:38
CFCString::~CFCString
virtual ~CFCString()
Definition: CFCString.cpp:35
CFCString::UTF8
const char * UTF8(std::string &str)
Definition: CFCString.cpp:78
CFCString::CFCString
CFCString(CFStringRef cf_str=NULL)
Definition: CFCString.cpp:14
CFCString::GetFileSystemRepresentation
const char * GetFileSystemRepresentation(std::string &str)
Definition: CFCString.cpp:37
CFCString::GetLength
CFIndex GetLength() const
Definition: CFCString.cpp:146
CFCString::FileSystemRepresentation
static const char * FileSystemRepresentation(CFStringRef cf_str, std::string &str)
Definition: CFCString.cpp:126