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


C++ ConstructData函数代码示例

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


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

示例1: WatchMethod

/**********************************************************************
  NAME         : WatchMethod
  DESCRIPTION  : Prints out a trace of the beginning or end
                   of the execution of a generic function
                   method
  INPUTS       : A string to indicate beginning or end of execution
  RETURNS      : Nothing useful
  SIDE EFFECTS : None
  NOTES        : Uses the globals CurrentGeneric, CurrentMethod,
                   ProcParamArraySize and ProcParamArray for
                   other trace info
 **********************************************************************/
static void WatchMethod(
  Environment *theEnv,
  const char *tstring)
  {
   if (ConstructData(theEnv)->ClearReadyInProgress ||
       ConstructData(theEnv)->ClearInProgress)
     { return; }

   WriteString(theEnv,STDOUT,"MTH ");
   WriteString(theEnv,STDOUT,tstring);
   WriteString(theEnv,STDOUT," ");
   if (DefgenericData(theEnv)->CurrentGeneric->header.whichModule->theModule != GetCurrentModule(theEnv))
     {
      WriteString(theEnv,STDOUT,DefgenericModule(DefgenericData(theEnv)->CurrentGeneric));
      WriteString(theEnv,STDOUT,"::");
     }
   WriteString(theEnv,STDOUT,DefgenericData(theEnv)->CurrentGeneric->header.name->contents);
   WriteString(theEnv,STDOUT,":#");
   if (DefgenericData(theEnv)->CurrentMethod->system)
     WriteString(theEnv,STDOUT,"SYS");
   PrintUnsignedInteger(theEnv,STDOUT,DefgenericData(theEnv)->CurrentMethod->index);
   WriteString(theEnv,STDOUT," ");
   WriteString(theEnv,STDOUT," ED:");
   WriteInteger(theEnv,STDOUT,EvaluationData(theEnv)->CurrentEvaluationDepth);
   PrintProcParamArray(theEnv,STDOUT);
  }
开发者ID:DrItanium,项目名称:maya,代码行数:38,代码来源:genrcexe.c

示例2: RemoveConstruct

bool RemoveConstruct(
  Environment *theEnv,
  const char *name)
  {
   Construct *currentPtr, *lastPtr = NULL;

   for (currentPtr = ConstructData(theEnv)->ListOfConstructs;
        currentPtr != NULL;
        currentPtr = currentPtr->next)
     {
      if (strcmp(name,currentPtr->constructName) == 0)
        {
         if (lastPtr == NULL)
           { ConstructData(theEnv)->ListOfConstructs = currentPtr->next; }
         else
           { lastPtr->next = currentPtr->next; }
         rtn_struct(theEnv,construct,currentPtr);
         return true;
        }

      lastPtr = currentPtr;
     }

   return false;
  }
开发者ID:DrItanium,项目名称:maya,代码行数:25,代码来源:constrct.c

示例3: ReplaceClassNameWithReference

/***************************************************
  NAME         : ReplaceClassNameWithReference
  DESCRIPTION  : In parsing a make instance call,
                 this function replaces a constant
                 class name with an actual pointer
                 to the class
  INPUTS       : The expression
  RETURNS      : TRUE if all OK, FALSE
                 if class cannot be found
  SIDE EFFECTS : The expression type and value are
                 modified if class is found
  NOTES        : Searches current nd imported
                 modules for reference
  CHANGES      : It's now possible to create an instance of a
                 class that's not in scope if the module name
                 is specified.
 ***************************************************/
static intBool ReplaceClassNameWithReference(
  void *theEnv,
  EXPRESSION *theExp)
  {
   const char *theClassName;
   void *theDefclass;

   if (theExp->type == SYMBOL)
     {
      theClassName = ValueToString(theExp->value);
      //theDefclass = (void *) LookupDefclassInScope(theEnv,theClassName);
      theDefclass = (void *) LookupDefclassByMdlOrScope(theEnv,theClassName); // Module or scope is now allowed
      if (theDefclass == NULL)
        {
         CantFindItemErrorMessage(theEnv,"class",theClassName);
         return(FALSE);
        }
      if (EnvClassAbstractP(theEnv,theDefclass))
        {
         PrintErrorID(theEnv,"INSMNGR",3,FALSE);
         EnvPrintRouter(theEnv,WERROR,"Cannot create instances of abstract class ");
         EnvPrintRouter(theEnv,WERROR,theClassName);
         EnvPrintRouter(theEnv,WERROR,".\n");
         return(FALSE);
        }
      theExp->type = DEFCLASS_PTR;
      theExp->value = theDefclass;
      
#if (! RUN_TIME) && (! BLOAD_ONLY)
      if (! ConstructData(theEnv)->ParsingConstruct)
        { ConstructData(theEnv)->DanglingConstructs++; }
#endif
     }
   return(TRUE);
  }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:52,代码来源:inspsr.c

示例4: AddSaveFunction

globle BOOLEAN AddSaveFunction(
  void *theEnv,
  char *name,
  void (*functionPtr)(void *,void *,char *),
  int priority)
  {
#if (MAC_MCW || IBM_MCW) && (RUN_TIME || BLOAD_ONLY)
#pragma unused(name)
#pragma unused(functionPtr)
#pragma unused(priority)
#endif

#if (! RUN_TIME) && (! BLOAD_ONLY)
   ConstructData(theEnv)->ListOfSaveFunctions =
     AddFunctionToCallList(theEnv,name,priority,
                           (void (*)(void *)) functionPtr,
                           ConstructData(theEnv)->ListOfSaveFunctions,TRUE);
#else
#if MAC_MCW || IBM_MCW
#pragma unused(theEnv)
#endif
#endif

   return(1);
  }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:25,代码来源:constrct.c

示例5: RemoveConstruct

globle int RemoveConstruct(
  void *theEnv,
  const char *name)
  {
   struct construct *currentPtr, *lastPtr = NULL;

   for (currentPtr = ConstructData(theEnv)->ListOfConstructs;
        currentPtr != NULL;
        currentPtr = currentPtr->next)
     {
      if (strcmp(name,currentPtr->constructName) == 0)
        {
         if (lastPtr == NULL)
           { ConstructData(theEnv)->ListOfConstructs = currentPtr->next; }
         else
           { lastPtr->next = currentPtr->next; }
         rtn_struct(theEnv,construct,currentPtr);
         return(TRUE);
        }

      lastPtr = currentPtr;
     }

   return(FALSE);
  }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:25,代码来源:constrct.c

示例6: AddSaveFunction

globle intBool AddSaveFunction(
  void *theEnv,
  EXEC_STATUS,
  char *name,
  void (*functionPtr)(void *,EXEC_STATUS,void *,char *),
  int priority)
  {
#if (MAC_MCW || WIN_MCW) && (RUN_TIME || BLOAD_ONLY)
#pragma unused(name)
#pragma unused(functionPtr)
#pragma unused(priority)
#endif

#if (! RUN_TIME) && (! BLOAD_ONLY)
   ConstructData(theEnv,execStatus)->ListOfSaveFunctions =
     AddFunctionToCallList(theEnv,execStatus,name,priority,
                           (void (*)(void *,EXEC_STATUS)) functionPtr,
                           ConstructData(theEnv,execStatus)->ListOfSaveFunctions,TRUE);
#else
#if MAC_MCW || WIN_MCW || MAC_XCD
#pragma unused(theEnv,execStatus)
#endif
#endif

   return(1);
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:26,代码来源:constrct.c

示例7: int

globle int (*SetBeforeResetFunction(void *theEnv,
                                    int (*theFunction)(void *)))(void *)
  {
   int (*tempFunction)(void *);

   tempFunction = ConstructData(theEnv)->BeforeResetFunction;
   ConstructData(theEnv)->BeforeResetFunction = theFunction;
   return(tempFunction);
  }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:9,代码来源:constrct.c

示例8: ConstructData

BeforeResetFunction *SetBeforeResetFunction(
  Environment *theEnv,
  BeforeResetFunction *theFunction)
  {
   BeforeResetFunction *tempFunction;

   tempFunction = ConstructData(theEnv)->BeforeResetCallback;
   ConstructData(theEnv)->BeforeResetCallback = theFunction;
   return tempFunction;
  }
开发者ID:DrItanium,项目名称:maya,代码行数:10,代码来源:constrct.c

示例9: void

globle void (*EnvSetParserErrorCallback(void *theEnv,
                                        void (*functionPtr)(void *,const char *,const char *,const char *,long)))
            (void *,const char *,const char *,const char*,long)
  {
   void (*tmpPtr)(void *,const char *,const char *,const char *,long);

   tmpPtr = ConstructData(theEnv)->ParserErrorCallback;
   ConstructData(theEnv)->ParserErrorCallback = functionPtr;
   return(tmpPtr);
  }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:10,代码来源:constrct.c

示例10: ParseConstruct

globle int ParseConstruct(
  void *theEnv,
  char *name,
  char *logicalName)
  {
   struct construct *currentPtr;
   int rv, ov;

   /*=================================*/
   /* Look for a valid construct name */
   /* (e.g. defrule, deffacts).       */
   /*=================================*/

   currentPtr = FindConstruct(theEnv,name);
   if (currentPtr == NULL) return(-1);

   /*==================================*/
   /* Prepare the parsing environment. */
   /*==================================*/

   ov = GetHaltExecution(theEnv);
   SetEvaluationError(theEnv,FALSE);
   SetHaltExecution(theEnv,FALSE);
   ClearParsedBindNames(theEnv);
   PushRtnBrkContexts(theEnv);
   ExpressionData(theEnv)->ReturnContext = FALSE;
   ExpressionData(theEnv)->BreakContext = FALSE;
   EvaluationData(theEnv)->CurrentEvaluationDepth++;

   /*=======================================*/
   /* Call the construct's parsing routine. */
   /*=======================================*/

   ConstructData(theEnv)->ParsingConstruct = TRUE;
   rv = (*currentPtr->parseFunction)(theEnv,logicalName);
   ConstructData(theEnv)->ParsingConstruct = FALSE;

   /*===============================*/
   /* Restore environment settings. */
   /*===============================*/

   EvaluationData(theEnv)->CurrentEvaluationDepth--;
   PopRtnBrkContexts(theEnv);

   ClearParsedBindNames(theEnv);
   SetPPBufferStatus(theEnv,OFF);
   SetHaltExecution(theEnv,ov);

   /*==============================*/
   /* Return the status of parsing */
   /* the construct.               */
   /*==============================*/

   return(rv);
  }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:55,代码来源:cstrcpsr.c

示例11: EnvRemoveResetFunction

bool EnvRemoveResetFunction(
  void *theEnv,
  const char *name)
  {
   bool found;

   ConstructData(theEnv)->ListOfResetFunctions =
      RemoveFunctionFromCallList(theEnv,name,ConstructData(theEnv)->ListOfResetFunctions,&found);
   
   return found;
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:11,代码来源:constrct.c

示例12: RemoveResetFunction

bool RemoveResetFunction(
  Environment *theEnv,
  const char *name)
  {
   bool found;

   ConstructData(theEnv)->ListOfResetFunctions =
      RemoveVoidFunctionFromCallList(theEnv,name,ConstructData(theEnv)->ListOfResetFunctions,&found);

   return found;
  }
开发者ID:DrItanium,项目名称:maya,代码行数:11,代码来源:constrct.c

示例13: int

globle int (*SetBeforeResetFunction(
	void *theEnv,
  EXEC_STATUS,
  int (*theFunction)(void *,EXEC_STATUS)))(void *,EXEC_STATUS)
  {
   int (*tempFunction)(void *,EXEC_STATUS);

   tempFunction = ConstructData(theEnv,execStatus)->BeforeResetFunction;
   ConstructData(theEnv,execStatus)->BeforeResetFunction = theFunction;
   return(tempFunction);
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:11,代码来源:constrct.c

示例14: EnvAddResetFunction

globle intBool EnvAddResetFunction(
  void *theEnv,
  const char *name,
  void (*functionPtr)(void *),
  int priority)
  {
   ConstructData(theEnv)->ListOfResetFunctions = AddFunctionToCallList(theEnv,name,priority,
                                                functionPtr,
                                                ConstructData(theEnv)->ListOfResetFunctions,TRUE);
   return(TRUE);
  }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:11,代码来源:constrct.c

示例15: EnvAddResetFunction

globle intBool EnvAddResetFunction(
  void *theEnv,
  EXEC_STATUS,
  char *name,
  void (*functionPtr)(void *,EXEC_STATUS),
  int priority)
  {
   ConstructData(theEnv,execStatus)->ListOfResetFunctions = AddFunctionToCallList(theEnv,execStatus,name,priority,
                                                functionPtr,
                                                ConstructData(theEnv,execStatus)->ListOfResetFunctions,TRUE);
   return(TRUE);
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:12,代码来源:constrct.c


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