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
16class CFCString : public CFCReleaser<CFStringRef> {
17public:
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 ~CFCString() override;
24
25 const char *GetFileSystemRepresentation(std::string &str);
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() override
CFCString(const CFCString &rhs)
CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type)
Definition: CFCString.cpp:51
CFCString & operator=(const CFCString &rhs)
Definition: CFCString.cpp:20
static const char * ExpandTildeInPath(const char *path, std::string &expanded_path)
Definition: CFCString.cpp:108
const char * UTF8(std::string &str)
Definition: CFCString.cpp:78
CFIndex GetLength() const
Definition: CFCString.cpp:146
static const char * FileSystemRepresentation(CFStringRef cf_str, std::string &str)
Definition: CFCString.cpp:126
const char * GetFileSystemRepresentation(std::string &str)
Definition: CFCString.cpp:37
CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path)
Definition: CFCString.cpp:69
CFStringRef SetFileSystemRepresentation(const char *path)
Definition: CFCString.cpp:41