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


C++ FindFunction函数代码示例

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


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


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