这篇教程C++ xstr函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xstr函数的典型用法代码示例。如果您正苦于以下问题:C++ xstr函数的具体用法?C++ xstr怎么用?C++ xstr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xstr函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mainint main(int argc, char *argv[]){ // TODO: This all should be wrapped into common class QGuiApplication app(argc, argv); ApplicationMain main(&app); ConsoleApplication consoleApp; if (main.hasApplicationCode()) consoleApp.setApplicationCode(main.applicationCode());#ifdef GBERRY_DEBUG_QML_IMPORT_PATH consoleApp.setImportPaths(QString(xstr(GBERRY_DEBUG_QML_IMPORT_PATH)));#endif#ifdef GBERRY_ASSETS_FIXED_ROOT_PATH consoleApp.assets().setRootPath(QString(xstr(GBERRY_ASSETS_FIXED_ROOT_PATH)));#endif#ifdef GBERRY_FIXED_ROOT_PATH consoleApp.currentApplication().setRootPath(QString(xstr(GBERRY_FIXED_ROOT_PATH)));#endif consoleApp.run("qrc:/main.qml"); return app.exec();}
开发者ID:gberryproject,项目名称:gberry,代码行数:26,
示例2: str/** Parse UID to type and ID strings. * Note that the returned values (type and id) must be freed once they are * no longer used. Also verifies lengths of the type and id strings. * @param uid UID to parse * @param type upon return contains the type part of the UID * @param id upon return contains the ID part */voidInterface::parse_uid(const char *uid, std::string &type, std::string &id){ regex_t re; int ec = 0;// Requires in parse_uid()#define str(s) #s#define xstr(s) str(s) if ((ec = regcomp(&re, "^([a-zA-Z0-9]{1," xstr(__INTERFACE_TYPE_SIZE) "})::" "([a-zA-Z0-9 _///.-]{1," xstr(__INTERFACE_ID_SIZE) "})$", REG_EXTENDED)) != 0) { char errbuf[1024]; regerror(ec, &re, errbuf, 1024); throw Exception("Failed to created regular expression to parse UID (%s)", errbuf); } regmatch_t matches[3]; if (regexec(&re, uid, 3, matches, 0) != 0) { regfree(&re); throw Exception("Failed to match UID %s, format error.", uid); } type.assign(&(uid[matches[1].rm_so]), matches[1].rm_eo - matches[1].rm_so); id.assign(&(uid[matches[2].rm_so]), matches[2].rm_eo - matches[2].rm_so); regfree(&re);}
开发者ID:tempbottle,项目名称:fawkes,代码行数:35,
示例3: praat_showLogovoid praat_showLogo (bool autoPopDown) { #if gtk static const gchar *authors [3] = { "Paul Boersma", "David Weenink", nullptr }; GuiObject dialog = gtk_about_dialog_new (); #define xstr(s) str(s) #define str(s) #s gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), xstr (PRAAT_VERSION_STR)); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), "Copyright C++ xstrcasecmp函数代码示例 C++ xsprintf函数代码示例
|