clang API Documentation
00001 /*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\ 00002 |* *| 00003 |* The LLVM Compiler Infrastructure *| 00004 |* *| 00005 |* This file is distributed under the University of Illinois Open Source *| 00006 |* License. See LICENSE.TXT for details. *| 00007 |* *| 00008 |*===----------------------------------------------------------------------===*| 00009 |* *| 00010 |* This header provides the interface to C Index strings. *| 00011 |* *| 00012 \*===----------------------------------------------------------------------===*/ 00013 00014 #ifndef LLVM_CLANG_C_CXSTRING_H 00015 #define LLVM_CLANG_C_CXSTRING_H 00016 00017 #include "clang-c/Platform.h" 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 /** 00024 * \defgroup CINDEX_STRING String manipulation routines 00025 * \ingroup CINDEX 00026 * 00027 * @{ 00028 */ 00029 00030 /** 00031 * \brief A character string. 00032 * 00033 * The \c CXString type is used to return strings from the interface when 00034 * the ownership of that string might differ from one call to the next. 00035 * Use \c clang_getCString() to retrieve the string data and, once finished 00036 * with the string data, call \c clang_disposeString() to free the string. 00037 */ 00038 typedef struct { 00039 const void *data; 00040 unsigned private_flags; 00041 } CXString; 00042 00043 /** 00044 * \brief Retrieve the character data associated with the given string. 00045 */ 00046 CINDEX_LINKAGE const char *clang_getCString(CXString string); 00047 00048 /** 00049 * \brief Free the given string. 00050 */ 00051 CINDEX_LINKAGE void clang_disposeString(CXString string); 00052 00053 /** 00054 * @} 00055 */ 00056 00057 #ifdef __cplusplus 00058 } 00059 #endif 00060 #endif 00061