• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ QUOTE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中QUOTE函数的典型用法代码示例。如果您正苦于以下问题:C++ QUOTE函数的具体用法?C++ QUOTE怎么用?C++ QUOTE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了QUOTE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char **argv) {
    if(strcmp(QUOTE(DEF_WITH_BACKSLASH), COMPARE_WITH)) {
        printf("Arg string is quoted incorrectly: %s instead of %s\n",
               QUOTE(DEF_WITH_BACKSLASH), COMPARE_WITH);
        return 1;
    }
    return 0;
}
开发者ID:MathieuDuponchelle,项目名称:meson,代码行数:8,代码来源:comparer-end-notstring.c


示例2: main

int
main()
{
  QUOTE("hello"_s);

  QUOTE('"'_t);
  QUOTE('\''_t);
  QUOTE('\\'_t);
}
开发者ID:emsr,项目名称:tr2,代码行数:9,代码来源:pr61038.C


示例3: fprintf

/**
 * @brief glob to regex
 * @param glob string containing glob
 * @return string containing regex
 *
 * Converts a glob expression to a regex
 */
std::string FileSystem::glob_to_regex(const std::string& glob) const
{
	std::string regex;
	regex.reserve(glob.size()<<1);
	int braces = 0;
	for (std::string::const_iterator i = glob.begin(); i != glob.end(); ++i) {
		char c = *i;
#ifdef DEBUG
		if (braces>=5)
			fprintf(stderr,"glob_to_regex warning: braces nested too deeply\n%s\n", glob.c_str());
#endif
		switch (c) {
			case '*':
				regex+=".*";
				break;
			case '?':
				regex+='.';
				break;
			case '{':
				braces++;
				regex+='(';
				break;
			case '}':
#ifdef DEBUG
				if (!braces)
					fprintf(stderr,"glob_to_regex warning: closing brace without an equivalent opening brace\n%s\n", glob.c_str());
#endif
				regex+=')';
				braces--;
				break;
			case ',':
				if (braces)
					regex+='|';
				else
					QUOTE(c,regex);
				break;
			case '\\':
#ifdef DEBUG
				if (++i==glob.end())
					fprintf(stderr,"glob_to_regex warning: pattern ends with backslash\n%s\n", glob.c_str());
#else
				++i;
#endif
				QUOTE(*i,regex);
				break;
			default:
				QUOTE(c,regex);
				break;
		}
	}
#ifdef DEBUG
	if (braces)
		fprintf(stderr,"glob_to_regex warning: unterminated brace expression\n%s\n", glob.c_str());
#endif
	return regex;
}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:63,代码来源:FileSystem.cpp


示例4: QUOTE

void MagRead::aboutDialogue() {
	QMessageBox *mbox = new QMessageBox;

	mbox->setText( "MagRead v" QUOTE( APP_VERSION ) "<br>\nwritten by Jeffrey Malone &lt;<a href=\"mailto:[email protected]\">[email protected]</a>&gt;<br>\nMore information can be found at <a href=\"http://blog.tehinterweb.com/\">http://blog.tehinterweb.com</a>" );

	mbox->exec();
}
开发者ID:5stringmonster,项目名称:MagRead,代码行数:7,代码来源:magread.cpp


示例5: pic32_update_resource

void pic32_update_resource(const char *resource) {
  /* The tool_version is defined in the string MCHP_VERSION */
  char *Microchip;
#ifndef MCHP_VERSION
  char *new_version = xstrdup("undefined1_21");
#warning MCHP_VERSION not defined
#else
  char *new_version = xstrdup(QUOTE(MCHP_VERSION));
#endif
  int major = 0, minor = 0;

  Microchip = new_version;
  if (Microchip) {
    for (; (*Microchip) && ((*Microchip < '0') || (*Microchip > '9')); 
         Microchip++);
    if (*Microchip) {
      major = strtol(Microchip, &Microchip, 0);
      if ((*Microchip) && ((*Microchip == '_') || (*Microchip == '.'))) {
         Microchip++;
         minor = strtol(Microchip, &Microchip, 0);
         for (; *Microchip && *Microchip != ' '; Microchip++);
      }
      pic32_tool_version = major *100 + minor;
      version_part1 = new_version;
      *Microchip = 0;
      version_part2 = Microchip+1;
    }
  }
  get_resource_path(resource);
  process_resource_file(0, 0);
}
开发者ID:crathish,项目名称:chipKIT-cxx,代码行数:31,代码来源:cpu-pic32.c


示例6: mDS

cAppli_MPI2Ply::cAppli_MPI2Ply(int argc,char ** argv):
    mDS (1.0)
{
    ElInitArgMain
    (
        argc,argv,
        LArgMain()  << EAMC(mName,"Dir or PMI-Type (QuickMac ....)",eSAM_None,ListOfVal(eNbTypeMMByP)),
        LArgMain()
        << EAM(mDS,"DS",true,"Dowscale, Def=1.0")
        << EAM(mMergeOut,"Out",true,"Ply File Results")
        << EAM(mPat,"Pat",true,"Pattern for selecting images (Def=All image in files)",eSAM_IsPatFile)
    );

    if(MMVisualMode) return;

    mCFPI = new cChantierFromMPI(mName,mDS,mPat);

    mComNuageMerge =       MM3dBinFile("TestLib  MergeCloud ")
                           +   mCFPI-> mStrImOri0
                           + " ModeMerge=" + mCFPI->mStrType
                           + " DownScale=" +ToString(mDS)
                           + " SzNorm=3"
                           + " PlyCoul=true"
                           ;

    std::string aPatPly = "Nuage-Merge-" +mPat + ".*.ply";


    if (! EAMIsInit(&mMergeOut)) mMergeOut =  mCFPI->mFullDirChantier+"C3DC_"+ mCFPI->mStrType + ".ply";
    mComCatPly =  MM3dBinFile("MergePly ") + QUOTE( mCFPI->mFullDirPIm + aPatPly) + " Out="  + mMergeOut;

}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:32,代码来源:CPP_C3DC.cpp


示例7: rb_struct_aref

VALUE
rb_struct_aref(VALUE s, VALUE idx)
{
    long i;

    if (RB_TYPE_P(idx, T_SYMBOL)) {
	return rb_struct_aref_id(s, SYM2ID(idx));
    }
    else if (RB_TYPE_P(idx, T_STRING)) {
	ID id = rb_check_id(&idx);
	if (!id) {
	    rb_name_error_str(idx, "no member '%"PRIsVALUE"' in struct",
			      QUOTE(idx));
	}
	return rb_struct_aref_id(s, id);
    }

    i = NUM2LONG(idx);
    if (i < 0) i = RSTRUCT_LEN(s) + i;
    if (i < 0)
        rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
		 i, RSTRUCT_LEN(s));
    if (RSTRUCT_LEN(s) <= i)
        rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
		 i, RSTRUCT_LEN(s));
    return RSTRUCT_PTR(s)[i];
}
开发者ID:Danylyuk,项目名称:first_app,代码行数:27,代码来源:struct.c


示例8: rb_struct_aset

VALUE
rb_struct_aset(VALUE s, VALUE idx, VALUE val)
{
    long i;

    if (RB_TYPE_P(idx, T_SYMBOL)) {
        return rb_struct_aset_id(s, SYM2ID(idx), val);
    }
    if (RB_TYPE_P(idx, T_STRING)) {
        ID id = rb_check_id(&idx);
        if (!id) {
            rb_name_error_str(idx, "no member '%"PRIsVALUE"' in struct",
                              QUOTE(idx));
        }
        return rb_struct_aset_id(s, id, val);
    }

    i = NUM2LONG(idx);
    if (i < 0) i = RSTRUCT_LEN(s) + i;
    if (i < 0) {
        rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
                 i, RSTRUCT_LEN(s));
    }
    if (RSTRUCT_LEN(s) <= i) {
        rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
                 i, RSTRUCT_LEN(s));
    }
    rb_struct_modify(s);
    RSTRUCT_SET(s, i, val);
    return val;
}
开发者ID:charneykaye,项目名称:learning-ruby-on-rails,代码行数:31,代码来源:struct.c


示例9: QUOTE

QString HelpWindow::helpPath() const
{
  // Possible locations of help file. Each entry is first tried as is, and then with
  // applicationDirPath as a prefix. Each entry should probably start with a slash
  QStringList paths;
#ifdef HELPDIR
#define QUOTE(string) _QUOTE(string)
#define _QUOTE(string) #string
  QString path = QString ("%1/engauge.qhc")
    .arg (QUOTE (HELPDIR));
  paths << path;
#endif
  paths << "/documentation/engauge.qhc";
  paths << "/../share/doc/engauge-digitizer/engauge.qhc";

  QStringList::iterator itr;
  for (itr = paths.begin(); itr != paths.end(); itr++) {

    QString pathAsIs = *itr;

    QFile fileAsIs (pathAsIs);
    if (fileAsIs.exists()) {
      return pathAsIs;
    }

    QString pathWithPrefix = QApplication::applicationDirPath() + pathAsIs;

    QFile fileWithPrefix (pathWithPrefix);
    if (fileWithPrefix.exists()) {
      return pathWithPrefix;
    }
  }

  return ""; // Empty file, since help file was never found, will simply result in empty help contents
}
开发者ID:mach0,项目名称:engauge6,代码行数:35,代码来源:HelpWindow.cpp


示例10: Load

static nsresult Load() {
  nsresult nr;
  nsCOMPtr<nsIXULAppInfo> app_info
      = do_GetService("@mozilla.org/xre/app-info;1", &nr);
  if (NS_FAILED(nr) || !app_info) {
    return NS_ERROR_FAILURE;
  }
  nsCString gecko_version;
  app_info->GetPlatformVersion(gecko_version);
  nsCString browser_version;
  app_info->GetVersion(browser_version);
  nsCOMPtr<nsIXULRuntime> xulRuntime
      = do_GetService("@mozilla.org/xre/app-info;1", &nr);
  if (NS_FAILED(nr) || !app_info) {
    return NS_ERROR_FAILURE;
  }
  nsCString os;
  xulRuntime->GetOS(os);
  nsCString abi;
  xulRuntime->GetXPCOMABI(abi);
  Debug::log(Debug::Info) << "Initializing GWT Developer Plugin"
      << Debug::flush;
  Debug::log(Debug::Info) << "  gecko=" << gecko_version.BeginReading()
      << ", firefox=" << browser_version.BeginReading() << ", abi="
      << os.BeginReading() << "_" << abi.BeginReading() << ", built for "
      QUOTE(BROWSER) << Debug::flush;
  return NS_OK;
}
开发者ID:dozed,项目名称:google-web-toolkit,代码行数:28,代码来源:ModuleOOPHM.cpp


示例11: add_arg

static void
add_arg(char *new_arg)
{
    if (argsCnt >= argsSz)
	argsp = (char **) erealloc((void *) argsp,
				   sizeof(char *) * (argsSz += 20));
    argsp[argsCnt++] = QUOTE(new_arg);
}
开发者ID:AugustoFernandes,项目名称:otp,代码行数:8,代码来源:erlexec.c


示例12: rb_print_undef_str

void
rb_print_undef_str(VALUE klass, VALUE name)
{
    rb_name_error_str(name, "undefined method `%"PRIsVALUE"' for %s `%"PRIsVALUE"'",
		      QUOTE(name),
		      (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
		      rb_class_name(klass));
}
开发者ID:Danylyuk,项目名称:first_app,代码行数:8,代码来源:eval_error.c


示例13: foreval_lambda_list

// process a lambda list for evaluation (quote every parameter name)
Cons * foreval_lambda_list(Cons * llist) {
	if(llist) {
		if(llist->car.type == ConsType && llist->car.d._Cons) {
			return Cons_new(
				ACons(Cons_new(ALambda(listc), 
					  Cons_new(QUOTE(llist->car.d._Cons->car), Cons_next(llist->car.d._Cons))
				)), 
				
				foreval_lambda_list(Cons_next(llist))
			);
		} else if(llist->car.type == SymbolType) {
			// this is an untyped lambda list. no need to check for type annotations (:)
			
			return Cons_new(QUOTE(llist->car), foreval_lambda_list(Cons_next(llist)));
		} else assert(false);
	} else return NULL;
}
开发者ID:jsalvadorp,项目名称:dor-22-09-2014,代码行数:18,代码来源:lambda.c


示例14: add_Eargs

static void
add_Eargs(char *new_arg)
{
    if (EargsCnt >= EargsSz)
	Eargsp = (char **) erealloc((void *) Eargsp,
				    sizeof(char *) * (EargsSz += 20));
    Eargsp[EargsCnt++] = QUOTE(new_arg);
}
开发者ID:AugustoFernandes,项目名称:otp,代码行数:8,代码来源:erlexec.c


示例15: GCPCtrl_main

int GCPCtrl_main(int argc,char ** argv)
{
    // MemoArg(argc,argv);
    MMD_InitArgcArgv(argc,argv);
    std::string  aDir,aPat,aFullDir;


    std::string AeroIn;
    std::string DicoPts;
    std::string MesureIm;
    bool        CPI = false;
    bool ShowUnused = true;


    ElInitArgMain
    (
        argc,argv,
        LArgMain()  << EAMC(aFullDir,"Full name (Dir+Pat)", eSAM_IsPatFile)
                    << EAMC(AeroIn,"Orientation in", eSAM_IsExistDirOri)
                    << EAMC(DicoPts,"Ground Control Points File", eSAM_IsExistFile)
                    << EAMC(MesureIm,"Image Measurements File", eSAM_IsExistFile),
        LArgMain()
                    <<  EAM(CPI,"CPI",true,"when Calib Per Image has to be used", eSAM_IsBool)
                    <<  EAM(ShowUnused,"ShowU",true,"Show unused point (def=true)", eSAM_IsBool)
    );

    if (!MMVisualMode)
    {
    #if (ELISE_windows)
        replace( aFullDir.begin(), aFullDir.end(), '\\', '/' );
    #endif
    SplitDirAndFile(aDir,aPat,aFullDir);
    StdCorrecNameOrient(AeroIn,aDir);



    std::string aCom =   MM3dBinFile_quotes( "Apero" )
                       + ToStrBlkCorr( MMDir()+"include/XML_MicMac/Apero-GCP-Control.xml" )+" "
                       + std::string(" DirectoryChantier=") +aDir +  std::string(" ")
                       + std::string(" +PatternAllIm=") + QUOTE(aPat) + std::string(" ")
                       + std::string(" +AeroIn=") + AeroIn
                       + std::string(" +DicoApp=") +  DicoPts
                       + std::string(" +SaisieIm=") +  MesureIm
                    ;

    if (EAMIsInit(&ShowUnused)) aCom = aCom + " +ShowUnused=" + ToString(ShowUnused);
    if (CPI) aCom += " +CPI=true ";


    std::cout << "Com = " << aCom << "\n";
    int aRes = System(aCom.c_str(),false,true,true);


    return aRes;

    }
    else return EXIT_SUCCESS;
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:58,代码来源:CPP_GCPBascule.cpp


示例16: QUOTE

int GRASS_EXPORT QgsGrass::versionRelease()
{
#ifdef GRASS_VERSION_RELEASE
#define QUOTE(x)  #x
  return QString( QUOTE( GRASS_VERSION_RELEASE ) ).toInt();
#else
  return QString( GRASS_VERSION_RELEASE ).toInt();
#endif
}
开发者ID:cugxiangzhenwei,项目名称:QGIS_174_VS2008,代码行数:9,代码来源:qgsgrass.cpp


示例17: main

main()
{
        __asm__(
                "mov rax, " QUOTE(SYS_exit) "\n"
                "mov rdi, 5\n"
                "syscall\n"
        );
        return 7;
}
开发者ID:MoochMcGee,项目名称:ucc-c-compiler,代码行数:9,代码来源:__asm__.c


示例18: ruby__sfvextra

static const char *
ruby__sfvextra(rb_printf_buffer *fp, size_t valsize, void *valp, long *sz, int sign)
{
    VALUE value, result = (VALUE)fp->_bf._base;
    rb_encoding *enc;
    char *cp;

    if (valsize != sizeof(VALUE)) return 0;
    value = *(VALUE *)valp;
    if (RBASIC(result)->klass) {
	rb_raise(rb_eRuntimeError, "rb_vsprintf reentered");
    }
    if (sign == '+') {
	if (RB_TYPE_P(value, T_CLASS)) {
# define LITERAL(str) (*sz = rb_strlen_lit(str), str)

	    if (value == rb_cNilClass) {
		return LITERAL("nil");
	    }
	    else if (value == rb_cFixnum) {
		return LITERAL("Fixnum");
	    }
	    else if (value == rb_cSymbol) {
		return LITERAL("Symbol");
	    }
	    else if (value == rb_cTrueClass) {
		return LITERAL("true");
	    }
	    else if (value == rb_cFalseClass) {
		return LITERAL("false");
	    }
# undef LITERAL
	}
	value = rb_inspect(value);
    }
    else {
	value = rb_obj_as_string(value);
	if (sign == ' ') value = QUOTE(value);
    }
    enc = rb_enc_compatible(result, value);
    if (enc) {
	rb_enc_associate(result, enc);
    }
    else {
	enc = rb_enc_get(result);
	value = rb_str_conv_enc_opts(value, rb_enc_get(value), enc,
				     ECONV_UNDEF_REPLACE|ECONV_INVALID_REPLACE,
				     Qnil);
	*(volatile VALUE *)valp = value;
    }
    StringValueCStr(value);
    RSTRING_GETMEM(value, cp, *sz);
    ((rb_printf_buffer_extra *)fp)->value = value;
    OBJ_INFECT(result, value);
    return cp;
}
开发者ID:nhinze,项目名称:rhodes,代码行数:56,代码来源:sprintf.c


示例19: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    a.setApplicationVersion(QUOTE(APP_VERSION));
    MainWindow w;
    w.show();
    // Set the initial screen position of the main window
    w.setGeometry(X_INITIAL, Y_INITIAL, w.width(), w.height());
    return a.exec();
} // main()
开发者ID:CDragu,项目名称:FotbalRobotic,代码行数:10,代码来源:main.cpp


示例20: displayUsage

static void displayUsage (void)
{
    (void) printf("usage: %s -tf <finaltime> -w -port <TCPport>\n",QUOTE(MODEL));
    (void) printf("arguments:\n");
    (void) printf("  -tf <finaltime> - overrides final time specified in "
                  "Simulink (inf for no limit).\n");
    (void) printf("  -w              - waits for Simulink to start model "
                  "in External Mode.\n");
    (void) printf("  -port <TCPport> - overrides 17725 default port in "
                  "External Mode, valid range 256 to 65535.\n");
}
开发者ID:Adeange1,项目名称:roboboat2015,代码行数:11,代码来源:rlnx_main.c



注:本文中的QUOTE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ QUrl函数代码示例发布时间:2022-05-30
下一篇:
C++ QUICKPOLL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap