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

C++ FindFunction函数代码示例

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

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



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

示例1: CompileText

/*
================
idProgram::CompileFunction
================
*/
const function_t *idProgram::CompileFunction( const char *functionName, const char *text ) {
	bool result;

	result = CompileText( functionName, text, false );

	if ( g_disasm.GetBool() ) {
		Disassemble();
	}

	if ( !result ) {
		gameLocal.Error( "Compile failed." );
	}

	return FindFunction( functionName );
}
开发者ID:0culus,项目名称:Doom3-for-MacOSX-,代码行数:20,代码来源:Script_Program.cpp


示例2: GetFunction

int GetFunction(ScriptValue *s, ScriptValue *o, ObjectValue *&obj) {
	int function;
	if (o->type != SCRIPT_OBJECT) {
		function = FindFunction(s->stringVal->value);
		obj = 0;
	}
	else {
		obj = o->objectVal;
		function = types[obj->type].FindFunction(s->stringVal);
		if (function < 0) return function;
		function = types[obj->type].functs[function].functionID;
		obj->AddRef();
	}
	return function;
}
开发者ID:ZmeyNet,项目名称:lcdmiscellany,代码行数:15,代码来源:ScriptTimer.cpp


示例3: ExpectedTypeError2

globle void ExpectedTypeError2(
  void *theEnv,
  char *functionName,
  int whichArg)
  {
   struct FunctionDefinition *theFunction;
   char *theType;

   theFunction = FindFunction(theEnv,functionName);

   if (theFunction == NULL) return;

   theType = GetArgumentTypeName(GetNthRestriction(theFunction,whichArg));

   ExpectedTypeError1(theEnv,functionName,whichArg,theType);
  }
开发者ID:femto,项目名称:rbclips,代码行数:16,代码来源:argacces.c


示例4: RemoveFunctionParser

globle int RemoveFunctionParser(
  char *functionName)
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(functionName);
   if (fdPtr == NULL)
     {
      PrintRouter(WERROR,"Function parsers can only be removed from existing functions.\n");
      return(0);
     }

   fdPtr->parser = NULL;

   return(1);
  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:16,代码来源:extnfunc.c


示例5: method

/********************************************************
  NAME         : AddImplicitMethods
  DESCRIPTION  : Adds a method(s) for a generic function
                   for an overloaded system function
  INPUTS       : A pointer to a gneeric function
  RETURNS      : Nothing useful
  SIDE EFFECTS : Method added
  NOTES        : Method marked as system
                 Assumes no other methods already present
 ********************************************************/
globle void AddImplicitMethods(
  void *theEnv,
  DEFGENERIC *gfunc)
  {
   struct FunctionDefinition *sysfunc;
   EXPRESSION action;

   sysfunc = FindFunction(theEnv,ValueToString(gfunc->header.name));
   if (sysfunc == NULL)
     return;
   action.type = FCALL;
   action.value = (void *) sysfunc;
   action.nextArg = NULL;
   action.argList = NULL;
   FormMethodsFromRestrictions(theEnv,gfunc,sysfunc->restrictions,&action);
  }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:26,代码来源:immthpsr.c


示例6: FindFunction

void FunctionTable::UpdateBuiltinFunction(const string & name, void * newInitFunction)
{
  //Find the function
  int funcIndex = FindFunction(name);

  //Assign the function pointer
  if(funcIndex != -1)
  {
    functionTable[funcIndex].origionalInternalPtr = newInitFunction;
  }
  else
  {
    LOGERR(("UpdateBuiltinFunction - Unknown built-in function? %s", name.c_str())); 
  }

}
开发者ID:jrco,项目名称:nau,代码行数:16,代码来源:FunctionTable.cpp


示例7: AddFunction

//---------------------------------------------------------------------------
void AddFunction(AnsiString func_name, void *DELEGATE, JSContext *ctx = 0, JSObject *obj = 0) {
    FunctionTypes *ft     = FindFunction(func_name, ctx, obj);
    bool          created = false;

    if (!ft) {
        ft      = new FunctionTypes;
        created = true;
    }
    ft->func_name = func_name;
    ft->DELEGATE  = DELEGATE;
    ft->ctx       = ctx;
    ft->obj       = obj;
    if (created) {
        functions.push_back(ft);
    }
}
开发者ID:Devronium,项目名称:ConceptApplicationServer,代码行数:17,代码来源:main.cpp


示例8: ExpectedTypeError2

void ExpectedTypeError2(
  Environment *theEnv,
  const char *functionName,
  unsigned int whichArg)
  {
   unsigned theRestriction;
   struct functionDefinition *theFunction;

   theFunction = FindFunction(theEnv,functionName);

   if (theFunction == NULL) return;

   theRestriction = GetNthRestriction(theEnv,theFunction,whichArg);
   ExpectedTypeError0(theEnv,functionName,whichArg);
   PrintTypesString(theEnv,STDERR,theRestriction,true);
  }
开发者ID:DrItanium,项目名称:maya,代码行数:16,代码来源:argacces.c


示例9: RemoveFunctionParser

int RemoveFunctionParser(
  void *theEnv,
  const char *functionName)
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(theEnv,functionName);
   if (fdPtr == NULL)
     {
      EnvPrintRouter(theEnv,WERROR,"Function parsers can only be removed from existing functions.\n");
      return(0);
     }

   fdPtr->parser = NULL;

   return(1);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:17,代码来源:extnfunc.c


示例10: _ASSERT

    HRESULT StackFrame::GetLanguageName( BSTR* langName )
    {
        _ASSERT( langName != NULL );
        HRESULT hr = S_OK;

        hr = FindFunction();
        if ( FAILED( hr ) )
            return hr;

        // if a function was found for our address, then it has a language
        // we'll assume it's D for now
        *langName = SysAllocString( L"D" );
        if ( *langName == NULL )
            return E_OUTOFMEMORY;

        return S_OK;
    }
开发者ID:aBothe,项目名称:MagoWrapper,代码行数:17,代码来源:StackFrame.cpp


示例11: FuncSeqOvlFlags

globle int FuncSeqOvlFlags(
  char *functionName,
  int seqp,
  int ovlp)
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(functionName);
   if (fdPtr == NULL)
     {
      PrintRouter(WERROR,"Only existing functions can be marked as using sequence expansion arguments/overloadable or not.\n");
      return(FALSE);
     }
   fdPtr->sequenceuseok = (short) (seqp ? TRUE : FALSE);
   fdPtr->overloadable = (short) (ovlp ? TRUE : FALSE);
   return(TRUE);
  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:17,代码来源:extnfunc.c


示例12: return

globle struct expr *FunctionReferenceExpression(
  void *theEnv,
  const char *name)
  {
#if DEFGENERIC_CONSTRUCT
   void *gfunc;
#endif
#if DEFFUNCTION_CONSTRUCT
   void *dptr;
#endif
   struct FunctionDefinition *fptr;

   /*=====================================================*/
   /* Check to see if the function call is a deffunction. */
   /*=====================================================*/

#if DEFFUNCTION_CONSTRUCT
   if ((dptr = (void *) LookupDeffunctionInScope(theEnv,name)) != NULL)
     { return(GenConstant(theEnv,PCALL,dptr)); }
#endif

   /*====================================================*/
   /* Check to see if the function call is a defgeneric. */
   /*====================================================*/

#if DEFGENERIC_CONSTRUCT
   if ((gfunc = (void *) LookupDefgenericInScope(theEnv,name)) != NULL)
     { return(GenConstant(theEnv,GCALL,gfunc)); }
#endif

   /*======================================*/
   /* Check to see if the function call is */
   /* a system or user defined function.   */
   /*======================================*/

   if ((fptr = FindFunction(theEnv,name)) != NULL)
     { return(GenConstant(theEnv,FCALL,fptr)); }

   /*===================================================*/
   /* The specified function name is not a deffunction, */
   /* defgeneric, or user/system defined function.      */
   /*===================================================*/

   return(NULL);
  }
开发者ID:chrislong,项目名称:clipsrules,代码行数:45,代码来源:evaluatn.c


示例13: FuncSeqOvlFlags

bool FuncSeqOvlFlags(
  void *theEnv,
  const char *functionName,
  bool seqp,
  bool ovlp)
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(theEnv,functionName);
   if (fdPtr == NULL)
     {
      EnvPrintRouter(theEnv,WERROR,"Only existing functions can be marked as using sequence expansion arguments/overloadable or not.\n");
      return(false);
     }
   fdPtr->sequenceuseok = (short) (seqp ? true : false);
   fdPtr->overloadable = (short) (ovlp ? true : false);
   return(true);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:18,代码来源:extnfunc.c


示例14: AddFunctionParser

globle int AddFunctionParser(
  char *functionName,
  struct expr *(*fpPtr)(struct expr *,char *))
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(functionName);
   if (fdPtr == NULL)
     {
      PrintRouter(WERROR,"Function parsers can only be added for existing functions.\n");
      return(0);
     }
   fdPtr->restrictions = NULL;
   fdPtr->parser = fpPtr;
   fdPtr->overloadable = FALSE;

   return(1);
  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:18,代码来源:extnfunc.c


示例15: DefineFunction2

/********************************************************************
  NAME         : GetFunctionRestrictions
  DESCRIPTION  : Gets DefineFunction2() restriction list for function
  INPUTS       : None
  RETURNS      : A string containing the function restriction codes
  SIDE EFFECTS : EvaluationError set on errors
  NOTES        : None
 ********************************************************************/
globle void *GetFunctionRestrictions(
    void *theEnv)
{
    DATA_OBJECT temp;
    struct FunctionDefinition *fptr;

    if (EnvArgTypeCheck(theEnv,"get-function-restrictions",1,SYMBOL,&temp) == FALSE)
        return((SYMBOL_HN *) EnvAddSymbol(theEnv,""));
    fptr = FindFunction(theEnv,DOToString(temp));
    if (fptr == NULL)
    {
        CantFindItemErrorMessage(theEnv,"function",DOToString(temp));
        SetEvaluationError(theEnv,TRUE);
        return((SYMBOL_HN *) EnvAddSymbol(theEnv,""));
    }
    if (fptr->restrictions == NULL)
        return((SYMBOL_HN *) EnvAddSymbol(theEnv,"0**"));
    return((SYMBOL_HN *) EnvAddSymbol(theEnv,fptr->restrictions));
}
开发者ID:jonathangizmo,项目名称:pyclips,代码行数:27,代码来源:miscfun.c


示例16: AddFunctionParser

int AddFunctionParser(
  void *theEnv,
  const char *functionName,
  struct expr *(*fpPtr)(void *,struct expr *,const char *))
  {
   struct FunctionDefinition *fdPtr;

   fdPtr = FindFunction(theEnv,functionName);
   if (fdPtr == NULL)
     {
      EnvPrintRouter(theEnv,WERROR,"Function parsers can only be added for existing functions.\n");
      return(0);
     }
   fdPtr->restrictions = NULL;
   fdPtr->parser = fpPtr;
   fdPtr->overloadable = false;

   return(1);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:19,代码来源:extnfunc.c


示例17: ClearDeffacts

static void ClearDeffacts(
  void *theEnv)
  {
#if (! RUN_TIME) && (! BLOAD_ONLY)
   struct expr *stub;
   struct deffacts *newDeffacts;

   /*=====================================*/
   /* Create the data structures for the  */
   /* expression (assert (initial-fact)). */
   /*=====================================*/

   stub = GenConstant(theEnv,FCALL,FindFunction(theEnv,"assert"));
   stub->argList = GenConstant(theEnv,DEFTEMPLATE_PTR,EnvFindDeftemplate(theEnv,"initial-fact"));
   ExpressionInstall(theEnv,stub);

   /*=============================================*/
   /* Create a deffacts data structure to contain */
   /* the expression and initialize it.           */
   /*=============================================*/

   newDeffacts = get_struct(theEnv,deffacts);
   newDeffacts->header.whichModule =
      (struct defmoduleItemHeader *) GetDeffactsModuleItem(theEnv,NULL);
   newDeffacts->header.name = (SYMBOL_HN *) EnvAddSymbol(theEnv,"initial-fact");
   IncrementSymbolCount(newDeffacts->header.name);
   newDeffacts->assertList = PackExpression(theEnv,stub);
   newDeffacts->header.next = NULL;
   newDeffacts->header.ppForm = NULL;
   newDeffacts->header.usrData = NULL;
   ReturnExpression(theEnv,stub);

   /*===========================================*/
   /* Store the deffacts in the current module. */
   /*===========================================*/

   AddConstructToModule(&newDeffacts->header);
#else
#if MAC_MCW || WIN_MCW || MAC_XCD
#pragma unused(theEnv)
#endif
#endif
  }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:43,代码来源:dffctbsc.c


示例18: check

void FKCHandler_CallDelegate::Compile(FKismetFunctionContext& Context, UEdGraphNode* Node)
{
	check(Node);
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>(); 
	const UFunction* SignatureFunction = FindFunction(Context, Node);
	if(!SignatureFunction)
	{
		CompilerContext.MessageLog.Error(*LOCTEXT("CallDelegateNoSignature_Error", "Cannot find signature function for @@").ToString(), Node);
		return;
	}

	if(SignatureFunction->HasMetaData(FBlueprintMetadata::MD_DefaultToSelf))
	{
		CompilerContext.MessageLog.Error(
			*FString::Printf(
				*LOCTEXT("CallDelegateWrongMeta_Error", "Signature function should not have %s metadata. @@").ToString(), 
				*FBlueprintMetadata::MD_DefaultToSelf.ToString()), 
			Node);
		return;
	}

	if(SignatureFunction->HasMetaData(FBlueprintMetadata::MD_WorldContext))
	{
		CompilerContext.MessageLog.Error(
			*FString::Printf(
				*LOCTEXT("CallDelegateWrongMeta_Error", "Signature function should not have %s metadata. @@").ToString(), 
				*FBlueprintMetadata::MD_WorldContext.ToString()), 
			Node);
		return;
	}

	if(SignatureFunction->HasMetaData(FBlueprintMetadata::MD_AutoCreateRefTerm))
	{
		CompilerContext.MessageLog.Error(
			*FString::Printf(
				*LOCTEXT("CallDelegateWrongMeta_Error", "Signature function should not have %s metadata. @@").ToString(), 
				*FBlueprintMetadata::MD_AutoCreateRefTerm.ToString()), 
			Node);
		return;
	}

	FKCHandler_CallFunction::Compile(Context, Node);
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:43,代码来源:DelegateNodeHandlers.cpp


示例19: CreateInitialDefinstances

/********************************************************
  NAME         : CreateInitialDefinstances
  DESCRIPTION  : Makes the initial-object definstances
                 structure for creating an initial-object
                 which will match default object patterns
                 in defrules
  INPUTS       : None
  RETURNS      : Nothing useful
  SIDE EFFECTS : initial-object definstances created
  NOTES        : None
 ********************************************************/
static void CreateInitialDefinstances(
  void *theEnv)
  {
   EXPRESSION *tmp;
   DEFINSTANCES *theDefinstances;

   theDefinstances = get_struct(theEnv,definstances);
   InitializeConstructHeader(theEnv,(char*)"definstances",(struct constructHeader *) theDefinstances,
                             DefclassData(theEnv)->INITIAL_OBJECT_SYMBOL);
   theDefinstances->busy = 0;
   tmp = GenConstant(theEnv,FCALL,(void *) FindFunction(theEnv,(char*)"make-instance"));
   tmp->argList = GenConstant(theEnv,INSTANCE_NAME,(void *) DefclassData(theEnv)->INITIAL_OBJECT_SYMBOL);
   tmp->argList->nextArg =
       GenConstant(theEnv,DEFCLASS_PTR,(void *) LookupDefclassInScope(theEnv,INITIAL_OBJECT_CLASS_NAME));
   theDefinstances->mkinstance = PackExpression(theEnv,tmp);
   ReturnExpression(theEnv,tmp);
   IncrementSymbolCount(GetDefinstancesNamePointer((void *) theDefinstances));
   ExpressionInstall(theEnv,theDefinstances->mkinstance);
   AddConstructToModule((struct constructHeader *) theDefinstances);
  }
开发者ID:DrItanium,项目名称:DROID-CLIPS,代码行数:31,代码来源:defins.c


示例20: FindFunction

Rlist *NewExpArgs(const FnCall *fp, const Promise *pp)
{
    int len;
    Rval rval;
    Rlist *newargs = NULL;
    FnCall *subfp;
    const FnCallType *fn = FindFunction(fp->name);

    len = RlistLen(fp->args);

    if (!fn->varargs)
    {
        if (len != FnNumArgs(fn))
        {
            CfOut(cf_error, "", "Arguments to function %s(.) do not tally. Expect %d not %d",
                  fp->name, FnNumArgs(fn), len);
            PromiseRef(cf_error, pp);
            exit(1);
        }
    }

    for (const Rlist *rp = fp->args; rp != NULL; rp = rp->next)
    {
        switch (rp->type)
        {
        case CF_FNCALL:
            subfp = (FnCall *) rp->item;
            rval = EvaluateFunctionCall(subfp, pp).rval;
            break;
        default:
            rval = ExpandPrivateRval(CONTEXTID, (Rval) {rp->item, rp->type});
            break;
        }

        CfDebug("EXPARG: %s.%s\n", CONTEXTID, (char *) rval.item);
        AppendRlist(&newargs, rval.item, rval.rtype);
        DeleteRvalItem(rval);
    }

    return newargs;
}
开发者ID:fbettag,项目名称:core,代码行数:41,代码来源:args.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ FindInReadable函数代码示例发布时间:2022-05-30
下一篇:
C++ FindFocus函数代码示例发布时间: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