当前位置: 首页>>代码示例>>C++>>正文


C++ QUOTE函数代码示例

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


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


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