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


C++ DefruleData函数代码示例

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


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

示例1: ResetDefrulesPrime

static void ResetDefrulesPrime(
  void *theEnv)
  {
   struct joinLink *theLink;
   struct partialMatch *notParent;
      
   for (theLink = DefruleData(theEnv)->RightPrimeJoins;
        theLink != NULL;
        theLink = theLink->next)
     { NetworkAssert(theEnv,theLink->join->rightMemory->beta[0],theLink->join); }

   for (theLink = DefruleData(theEnv)->LeftPrimeJoins;
        theLink != NULL;
        theLink = theLink->next)
     { 
      if ((theLink->join->patternIsNegated || theLink->join->joinFromTheRight) && 
          (! theLink->join->patternIsExists))
        {
         notParent = theLink->join->leftMemory->beta[0];

         if (theLink->join->secondaryNetworkTest != NULL)
           {
            if (EvaluateSecondaryNetworkTest(theEnv,notParent,theLink->join) == FALSE)
              { continue; }
           }

         notParent->marker = NULL;

         EPMDrive(theEnv,notParent,theLink->join);
        }
     }

  }
开发者ID:DrItanium,项目名称:electron,代码行数:33,代码来源:rulebsc.c

示例2: DefruleRunTimeInitialize

void DefruleRunTimeInitialize(
  Environment *theEnv,
  struct joinLink *rightPrime,
  struct joinLink *leftPrime)
  {
   Defmodule *theModule;
   Defrule *theRule, *theDisjunct;

   DefruleData(theEnv)->RightPrimeJoins = rightPrime;
   DefruleData(theEnv)->LeftPrimeJoins = leftPrime;

   SaveCurrentModule(theEnv);

   for (theModule = GetNextDefmodule(theEnv,NULL);
        theModule != NULL;
        theModule = GetNextDefmodule(theEnv,theModule))
     {
      SetCurrentModule(theEnv,theModule);
      for (theRule = GetNextDefrule(theEnv,NULL);
           theRule != NULL;
           theRule = GetNextDefrule(theEnv,theRule))
        {
         for (theDisjunct = theRule;
              theDisjunct != NULL;
              theDisjunct = theDisjunct->disjunct)
           {
            theDisjunct->header.env = theEnv;
            AddBetaMemoriesToRule(theEnv,theDisjunct->lastJoin);
           }
        }
     }

   RestoreCurrentModule(theEnv);
  }
开发者ID:DrItanium,项目名称:maya,代码行数:34,代码来源:ruledef.c

示例3: DefruleRunTimeInitialize

globle void DefruleRunTimeInitialize(
  void *theEnv,
  struct joinLink *rightPrime,
  struct joinLink *leftPrime)
  {
   struct defmodule *theModule;
   struct defrule *theRule, *theDisjunct;

   DefruleData(theEnv)->RightPrimeJoins = rightPrime;
   DefruleData(theEnv)->LeftPrimeJoins = leftPrime;   

   SaveCurrentModule(theEnv);

   for (theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,NULL);
        theModule != NULL;
        theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,theModule))
     {
      EnvSetCurrentModule(theEnv,(void *) theModule);
      for (theRule = EnvGetNextDefrule(theEnv,NULL);
           theRule != NULL;
           theRule = EnvGetNextDefrule(theEnv,theRule))
        { 
         for (theDisjunct = theRule;
              theDisjunct != NULL;
              theDisjunct = theDisjunct->disjunct)
           { AddBetaMemoriesToRule(theEnv,theDisjunct->lastJoin); }
        }
     }
     
   RestoreCurrentModule(theEnv);
  }
开发者ID:DrItanium,项目名称:DROID-CLIPS,代码行数:31,代码来源:ruledef.c

示例4: EnvSetBetaMemoryResizing

globle intBool EnvSetBetaMemoryResizing(
  void *theEnv,
  int value)
  {
   int ov;

   ov = DefruleData(theEnv)->BetaMemoryResizingFlag;

   DefruleData(theEnv)->BetaMemoryResizingFlag = value;

   return(ov);
  }
开发者ID:gmyoungblood,项目名称:CLIPS,代码行数:12,代码来源:rulecom.c

示例5: DefruleWatchAccess

globle unsigned DefruleWatchAccess(
  void *theEnv,
  int code,
  unsigned newState,
  struct expr *argExprs)
  {
   if (code)
     return(ConstructSetWatchAccess(theEnv,DefruleData(theEnv)->DefruleConstruct,newState,argExprs,
                                    EnvGetDefruleWatchActivations,EnvSetDefruleWatchActivations));
   else
     return(ConstructSetWatchAccess(theEnv,DefruleData(theEnv)->DefruleConstruct,newState,argExprs,
                                    EnvGetDefruleWatchFirings,EnvSetDefruleWatchFirings));
  }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:13,代码来源:rulebsc.c

示例6: DefruleWatchPrint

globle unsigned DefruleWatchPrint(
  void *theEnv,
  char *log,
  int code,
  struct expr *argExprs)
  {   
   if (code)
     return(ConstructPrintWatchAccess(theEnv,DefruleData(theEnv)->DefruleConstruct,log,argExprs,
                                      EnvGetDefruleWatchActivations,EnvSetDefruleWatchActivations));
   else
     return(ConstructPrintWatchAccess(theEnv,DefruleData(theEnv)->DefruleConstruct,log,argExprs,
                                      EnvGetDefruleWatchActivations,EnvSetDefruleWatchActivations));
  }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:13,代码来源:rulebsc.c

示例7: DeallocateDefruleData

static void DeallocateDefruleData(
  Environment *theEnv)
  {
   struct defruleModule *theModuleItem;
   Defmodule *theModule;
   Activation *theActivation, *tmpActivation;
   struct salienceGroup *theGroup, *tmpGroup;

#if BLOAD || BLOAD_AND_BSAVE
   if (Bloaded(theEnv))
     { return; }
#endif

   DoForAllConstructs(theEnv,DestroyDefruleAction,
                      DefruleData(theEnv)->DefruleModuleIndex,false,NULL);

   for (theModule = GetNextDefmodule(theEnv,NULL);
        theModule != NULL;
        theModule = GetNextDefmodule(theEnv,theModule))
     {
      theModuleItem = (struct defruleModule *)
                      GetModuleItem(theEnv,theModule,
                                    DefruleData(theEnv)->DefruleModuleIndex);

      theActivation = theModuleItem->agenda;
      while (theActivation != NULL)
        {
         tmpActivation = theActivation->next;

         rtn_struct(theEnv,activation,theActivation);

         theActivation = tmpActivation;
        }

      theGroup = theModuleItem->groupings;
      while (theGroup != NULL)
        {
         tmpGroup = theGroup->next;

         rtn_struct(theEnv,salienceGroup,theGroup);

         theGroup = tmpGroup;
        }

#if ! RUN_TIME
      rtn_struct(theEnv,defruleModule,theModuleItem);
#endif
     }

   rm(theEnv,DefruleData(theEnv)->AlphaMemoryTable,sizeof (ALPHA_MEMORY_HASH *) * ALPHA_MEMORY_HASH_SIZE);
  }
开发者ID:DrItanium,项目名称:maya,代码行数:51,代码来源:ruledef.c

示例8: DefruleWatchPrint

globle unsigned DefruleWatchPrint(
  void *theEnv,
  EXEC_STATUS,
  char *logName,
  int code,
  struct expr *argExprs)
  {   
   if (code)
     return(ConstructPrintWatchAccess(theEnv,execStatus,DefruleData(theEnv,execStatus)->DefruleConstruct,logName,argExprs,
                                      EnvGetDefruleWatchActivations,EnvSetDefruleWatchActivations));
   else
     return(ConstructPrintWatchAccess(theEnv,execStatus,DefruleData(theEnv,execStatus)->DefruleConstruct,logName,argExprs,
                                      EnvGetDefruleWatchActivations,EnvSetDefruleWatchActivations));
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:14,代码来源:rulebsc.c

示例9: ListDefrulesCommand

void ListDefrulesCommand(
  UDFContext *context,
  CLIPSValue *returnValue)
  {
   void *theEnv = UDFContextEnvironment(context);
   ListConstructCommand(context,"list-defrules",DefruleData(theEnv)->DefruleConstruct);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:7,代码来源:rulebsc.c

示例10: PPDefruleCommand

void PPDefruleCommand(
  UDFContext *context,
  CLIPSValue *returnValue)
  {
   void *theEnv = UDFContextEnvironment(context);
   PPConstructCommand(context,"ppdefrule",DefruleData(theEnv)->DefruleConstruct);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:7,代码来源:rulebsc.c

示例11: DefruleModuleFunction

void DefruleModuleFunction(
  UDFContext *context,
  CLIPSValue *returnValue)
  {
   void *theEnv = UDFContextEnvironment(context);
   CVSetCLIPSSymbol(returnValue,GetConstructModuleCommand(context,"defrule-module",DefruleData(theEnv)->DefruleConstruct));
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:7,代码来源:rulebsc.c

示例12: GetDefruleListFunction

void GetDefruleListFunction(
  UDFContext *context,
  CLIPSValue *returnValue)
  {
   void *theEnv = UDFContextEnvironment(context);
   GetConstructListFunction(context,"get-defrule-list",returnValue,DefruleData(theEnv)->DefruleConstruct);
  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:7,代码来源:rulebsc.c

示例13: GetDefruleListFunction

globle void GetDefruleListFunction(
  void *theEnv,
  EXEC_STATUS,
  DATA_OBJECT_PTR returnValue)
  {
   GetConstructListFunction(theEnv,execStatus,"get-defrule-list",returnValue,DefruleData(theEnv,execStatus)->DefruleConstruct); 
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:7,代码来源:rulebsc.c

示例14: EnvUndefrule

globle intBool EnvUndefrule(
  void *theEnv,
  EXEC_STATUS,
  void *theDefrule)
  {
   return(Undefconstruct(theEnv,execStatus,theDefrule,DefruleData(theEnv,execStatus)->DefruleConstruct)); 
  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:7,代码来源:rulebsc.c

示例15: DefruleBasicCommands

globle void DefruleBasicCommands(
  void *theEnv)
  {
   EnvAddResetFunction(theEnv,"defrule",ResetDefrules,70);
   AddSaveFunction(theEnv,"defrule",SaveDefrules,0);
#if (! RUN_TIME)
   AddClearReadyFunction(theEnv,"defrule",ClearDefrulesReady,0);
   EnvAddClearFunction(theEnv,"defrule",ClearDefrules,0);
#endif
   
#if DEBUGGING_FUNCTIONS
   AddWatchItem(theEnv,"rules",0,&DefruleData(theEnv)->WatchRules,70,DefruleWatchAccess,DefruleWatchPrint);
#endif

#if ! RUN_TIME
   EnvDefineFunction2(theEnv,"get-defrule-list",'m',PTIEF GetDefruleListFunction,"GetDefruleListFunction","01w");
   EnvDefineFunction2(theEnv,"undefrule",'v',PTIEF UndefruleCommand,"UndefruleCommand","11w");
   EnvDefineFunction2(theEnv,"defrule-module",'w',PTIEF DefruleModuleFunction,"DefruleModuleFunction","11w");

#if DEBUGGING_FUNCTIONS
   EnvDefineFunction2(theEnv,"rules",'v', PTIEF ListDefrulesCommand,"ListDefrulesCommand","01w");
   EnvDefineFunction2(theEnv,"list-defrules",'v', PTIEF ListDefrulesCommand,"ListDefrulesCommand","01w");
   EnvDefineFunction2(theEnv,"ppdefrule",'v',PTIEF PPDefruleCommand,"PPDefruleCommand","11w");
#endif

#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE)
   DefruleBinarySetup(theEnv);
#endif

#if CONSTRUCT_COMPILER && (! RUN_TIME)
   DefruleCompilerSetup(theEnv);
#endif

#endif
  }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:35,代码来源:rulebsc.c


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