您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GenWrite函数代码示例

51自学网 2021-06-01 21:03:08
  C++
这篇教程C++ GenWrite函数代码示例写得很实用,希望能帮到您。

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

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

示例1: WriteBinaryHeader

static void WriteBinaryHeader(  void *theEnv,  FILE *fp)  {   GenWrite(BloadData(theEnv)->BinaryPrefixID,(unsigned long) strlen(BloadData(theEnv)->BinaryPrefixID) + 1,fp);   GenWrite(BloadData(theEnv)->BinaryVersionID,(unsigned long) strlen(BloadData(theEnv)->BinaryVersionID) + 1,fp);  }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:7,


示例2: BsaveClassLinks

/***************************************************  NAME         : BsaveClassLinks  DESCRIPTION  : Writes class links binary data  INPUTS       : 1) The defclass                 2) The binary file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defclass links binary data written  NOTES        : None ***************************************************/static void BsaveClassLinks(  struct constructHeader *theDefclass,  void *buf)  {   DEFCLASS *cls = (DEFCLASS *) theDefclass;   register unsigned i;   long dummy_class_index;   for (i = 0 ;  i < cls->directSuperclasses.classCount ; i++)     {      dummy_class_index = DefclassIndex(cls->directSuperclasses.classArray[i]);      GenWrite((void *) &dummy_class_index,(UNLN) sizeof(long),(FILE *) buf);     }   LinkCount += cls->directSuperclasses.classCount;   for (i = 0 ;  i < cls->directSubclasses.classCount ; i++)     {      dummy_class_index = DefclassIndex(cls->directSubclasses.classArray[i]);      GenWrite((void *) &dummy_class_index,(UNLN) sizeof(long),(FILE *) buf);     }   LinkCount += cls->directSubclasses.classCount;   for (i = 0 ;  i < cls->allSuperclasses.classCount ; i++)     {      dummy_class_index = DefclassIndex(cls->allSuperclasses.classArray[i]);      GenWrite((void *) &dummy_class_index,(UNLN) sizeof(long),(FILE *) buf);     }   LinkCount += cls->allSuperclasses.classCount;  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:36,


示例3: WriteNeededConstraints

globle void WriteNeededConstraints(  void *theEnv,  FILE *fp)  {   int i;   unsigned short theIndex = 0;   unsigned long int numberOfUsedConstraints = 0;   CONSTRAINT_RECORD *tmpPtr;   BSAVE_CONSTRAINT_RECORD bsaveConstraints;   /*================================*/   /* Get the number of constraints. */   /*================================*/   for (i = 0; i < SIZE_CONSTRAINT_HASH; i++)     {      for (tmpPtr = ConstraintData(theEnv)->ConstraintHashtable[i];           tmpPtr != NULL;           tmpPtr = tmpPtr->next)        {         tmpPtr->bsaveIndex = theIndex++;         numberOfUsedConstraints++;        }     }   /*=============================================*/   /* If dynamic constraint checking is disabled, */   /* then no constraints are saved.              */   /*=============================================*/   if ((! EnvGetDynamicConstraintChecking(theEnv)) && (numberOfUsedConstraints != 0))     {      numberOfUsedConstraints = 0;      PrintWarningID(theEnv,"CSTRNBIN",1,FALSE);      EnvPrintRouter(theEnv,WWARNING,"Constraints are not saved with a binary image/n");      EnvPrintRouter(theEnv,WWARNING,"  when dynamic constraint checking is disabled./n");     }   /*============================================*/   /* Write out the number of constraints in the */   /* constraint table followed by each of the   */   /* constraints in the constraint table.       */   /*============================================*/   GenWrite(&numberOfUsedConstraints,(unsigned long) sizeof(unsigned long int),fp);   if (numberOfUsedConstraints == 0) return;   for (i = 0 ; i < SIZE_CONSTRAINT_HASH; i++)     {      for (tmpPtr = ConstraintData(theEnv)->ConstraintHashtable[i];           tmpPtr != NULL;           tmpPtr = tmpPtr->next)        {         CopyToBsaveConstraintRecord(theEnv,tmpPtr,&bsaveConstraints);         GenWrite(&bsaveConstraints,                  (unsigned long) sizeof(BSAVE_CONSTRAINT_RECORD),fp);        }     }  }
开发者ID:aliverobotics,项目名称:Pumas-SmallSize,代码行数:59,


示例4: WriteNeededSymbols

globle void WriteNeededSymbols(  void *theEnv,  FILE *fp)  {   unsigned long i;   size_t length;   SYMBOL_HN **symbolArray;   SYMBOL_HN *symbolPtr;   unsigned long int numberOfUsedSymbols = 0;   size_t size = 0;   /*=================================*/   /* Get a copy of the symbol table. */   /*=================================*/   symbolArray = GetSymbolTable(theEnv);   /*======================================================*/   /* Get the number of symbols and the total string size. */   /*======================================================*/   for (i = 0; i < SYMBOL_HASH_SIZE; i++)     {      for (symbolPtr = symbolArray[i];           symbolPtr != NULL;           symbolPtr = symbolPtr->next)        {         if (symbolPtr->neededSymbol)           {            numberOfUsedSymbols++;            size += strlen(symbolPtr->contents) + 1;           }        }     }   /*=============================================*/   /* Write out the symbols and the string sizes. */   /*=============================================*/   GenWrite((void *) &numberOfUsedSymbols,(unsigned long) sizeof(unsigned long int),fp);   GenWrite((void *) &size,(unsigned long) sizeof(unsigned long int),fp);   for (i = 0; i < SYMBOL_HASH_SIZE; i++)     {      for (symbolPtr = symbolArray[i];           symbolPtr != NULL;           symbolPtr = symbolPtr->next)        {         if (symbolPtr->neededSymbol)           {            length = strlen(symbolPtr->contents) + 1;            GenWrite((void *) symbolPtr->contents,(unsigned long) length,fp);           }        }     }  }
开发者ID:Chosko,项目名称:CLIPSJNI,代码行数:56,


示例5: WriteNeededFunctions

static void WriteNeededFunctions(  void *theEnv,  FILE *fp)  {   unsigned long int count = 0;   size_t space, length;   struct FunctionDefinition *functionList;   /*================================================*/   /* Assign each function an index if it is needed. */   /*================================================*/   for (functionList = GetFunctionList(theEnv);        functionList != NULL;        functionList = functionList->next)     {      if (functionList->bsaveIndex)        { functionList->bsaveIndex = (short int) count++; }      else        { functionList->bsaveIndex = -1; }     }   /*===================================================*/   /* Write the number of function names to be written. */   /*===================================================*/   GenWrite(&count,(unsigned long) sizeof(unsigned long int),fp);   if (count == 0)     {      GenWrite(&count,(unsigned long) sizeof(unsigned long int),fp);      return;     }   /*================================*/   /* Determine the amount of space  */   /* needed for the function names. */   /*================================*/   space = FunctionBinarySize(theEnv);   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   /*===============================*/   /* Write out the function names. */   /*===============================*/   for (functionList = GetFunctionList(theEnv);        functionList != NULL;        functionList = functionList->next)     {      if (functionList->bsaveIndex >= 0)        {         length = strlen(ValueToString(functionList->callFunctionName)) + 1;         GenWrite(ValueToString(functionList->callFunctionName),(unsigned long) length,fp);        }     }  }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:56,


示例6: WriteNeededBitMaps

static void WriteNeededBitMaps(  void *theEnv,  FILE *fp)  {   int i;   BITMAP_HN **bitMapArray;   BITMAP_HN *bitMapPtr;   unsigned long int numberOfUsedBitMaps = 0, size = 0;   unsigned short tempSize;   /*=================================*/   /* Get a copy of the bitmap table. */   /*=================================*/   bitMapArray = GetBitMapTable(theEnv);   /*======================================================*/   /* Get the number of bitmaps and the total bitmap size. */   /*======================================================*/   for (i = 0; i < BITMAP_HASH_SIZE; i++)     {      for (bitMapPtr = bitMapArray[i];           bitMapPtr != NULL;           bitMapPtr = bitMapPtr->next)        {         if (bitMapPtr->neededBitMap)           {            numberOfUsedBitMaps++;            size += (unsigned long) (bitMapPtr->size + sizeof(unsigned short));           }        }     }   /*========================================*/   /* Write out the bitmaps and their sizes. */   /*========================================*/   GenWrite((void *) &numberOfUsedBitMaps,(unsigned long) sizeof(unsigned long int),fp);   GenWrite((void *) &size,(unsigned long) sizeof(unsigned long int),fp);   for (i = 0; i < BITMAP_HASH_SIZE; i++)     {      for (bitMapPtr = bitMapArray[i];           bitMapPtr != NULL;           bitMapPtr = bitMapPtr->next)        {         if (bitMapPtr->neededBitMap)           {            tempSize = (unsigned short) bitMapPtr->size;            GenWrite((void *) &tempSize,(unsigned long) sizeof(unsigned short),fp);            GenWrite((void *) bitMapPtr->contents,(unsigned long) bitMapPtr->size,fp);           }        }     }  }
开发者ID:Chosko,项目名称:CLIPSJNI,代码行数:56,


示例7: BsaveStorage

static void BsaveStorage(  FILE *fp)  {   unsigned long space;   space = sizeof(long) * 2;   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   GenWrite(&NumberOfDefmodules,(unsigned long) sizeof(long int),fp);   GenWrite(&NumberOfPortItems,(unsigned long) sizeof(long int),fp);  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:10,


示例8: counts

/***********************************************************  NAME         : BsaveStorageDeffunctions  DESCRIPTION  : Writes out number of each type of structure                   required for deffunctions                 Space required for counts (unsigned long)  INPUTS       : File pointer of binary file  RETURNS      : Nothing useful  SIDE EFFECTS : Binary file adjusted  NOTES        : None ***********************************************************/static void BsaveStorageDeffunctions(  FILE *fp)  {   unsigned long space;   space = sizeof(unsigned long) * 2;   GenWrite((void *) &space,(unsigned long) sizeof(unsigned long),fp);   GenWrite((void *) &ModuleCount,(unsigned long) sizeof(long),fp);   GenWrite((void *) &DeffunctionCount,(unsigned long) sizeof(long),fp);  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:20,


示例9: BsaveStorage

static void BsaveStorage(  void *theEnv,  FILE *fp)  {   size_t space;   space = sizeof(long);   GenWrite(&space,sizeof(size_t),fp);   GenWrite(&FactBinaryData(theEnv)->NumberOfPatterns,sizeof(long int),fp);  }
开发者ID:DrItanium,项目名称:AdventureEngine,代码行数:10,


示例10: BsaveStorageObjectPatterns

/****************************************************  NAME         : BsaveStorageObjectPatterns  DESCRIPTION  : Writes out the number of bytes                 required for object pattern bitmaps,                 and the number of object pattern                 alpha an intermediate nodes  INPUTS       : Bsave file stream pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Counts written  NOTES        : None ****************************************************/static void BsaveStorageObjectPatterns(  FILE *fp)  {   UNLN space;   space = sizeof(long) * 2;   GenWrite(&space,(UNLN) sizeof(UNLN),fp);   GenWrite(&AlphaNodeCount,(UNLN) sizeof(long),fp);   GenWrite(&PatternNodeCount,(UNLN) sizeof(long),fp);  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:21,


示例11: counts

/***********************************************************  NAME         : BsaveStorageDefinstances  DESCRIPTION  : Writes out number of each type of structure                   required for definstances                 Space required for counts (unsigned long)  INPUTS       : File pointer of binary file  RETURNS      : Nothing useful  SIDE EFFECTS : Binary file adjusted  NOTES        : None ***********************************************************/static void BsaveStorageDefinstances(  void *theEnv,  FILE *fp)  {   unsigned long space;   space = sizeof(unsigned long) * 2;   GenWrite((void *) &space,(unsigned long) sizeof(unsigned long),fp);   GenWrite((void *) &DefinstancesBinaryData(theEnv)->ModuleCount,(unsigned long) sizeof(long),fp);   GenWrite((void *) &DefinstancesBinaryData(theEnv)->DefinstancesCount,(unsigned long) sizeof(long),fp);  }
开发者ID:RobotJustina,项目名称:JUSTINA,代码行数:21,


示例12: counts

/***********************************************************  NAME         : BsaveStorageDeffunctions  DESCRIPTION  : Writes out number of each type of structure                   required for deffunctions                 Space required for counts (unsigned long)  INPUTS       : File pointer of binary file  RETURNS      : Nothing useful  SIDE EFFECTS : Binary file adjusted  NOTES        : None ***********************************************************/static void BsaveStorageDeffunctions(    void *theEnv,    FILE *fp){    size_t space;    space = sizeof(unsigned long) * 2;    GenWrite((void *) &space,sizeof(size_t),fp);    GenWrite((void *) &DeffunctionBinaryData(theEnv)->ModuleCount,sizeof(unsigned long),fp);    GenWrite((void *) &DeffunctionBinaryData(theEnv)->DeffunctionCount,sizeof(unsigned long),fp);}
开发者ID:ricksladkey,项目名称:CLIPS,代码行数:21,


示例13: BsaveStorageObjectPatterns

/****************************************************  NAME         : BsaveStorageObjectPatterns  DESCRIPTION  : Writes out the number of bytes                 required for object pattern bitmaps,                 and the number of object pattern                 alpha an intermediate nodes  INPUTS       : Bsave file stream pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Counts written  NOTES        : None ****************************************************/static void BsaveStorageObjectPatterns(  void *theEnv,  FILE *fp)  {   size_t space;   space = sizeof(long) * 2;   GenWrite(&space,sizeof(size_t),fp);   GenWrite(&ObjectReteBinaryData(theEnv)->AlphaNodeCount,sizeof(long),fp);   GenWrite(&ObjectReteBinaryData(theEnv)->PatternNodeCount,sizeof(long),fp);  }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:22,


示例14: BsaveStorage

static void BsaveStorage(  void *theEnv,  FILE *fp)  {   unsigned long space;   space = sizeof(long) * 2;   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   GenWrite(&DefmoduleData(theEnv)->BNumberOfDefmodules,(unsigned long) sizeof(long int),fp);   GenWrite(&DefmoduleData(theEnv)->NumberOfPortItems,(unsigned long) sizeof(long int),fp);  }
开发者ID:femto,项目名称:rbclips,代码行数:11,


示例15: BsaveStorage

static void BsaveStorage(  void *theEnv,  FILE *fp)  {   unsigned long space;   space = sizeof(long) * 3;   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfDefruleModules,(unsigned long) sizeof(long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfDefrules,(unsigned long) sizeof(long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfJoins,(unsigned long) sizeof(long int),fp);  }
开发者ID:RobotJustina,项目名称:JUSTINA,代码行数:12,


示例16: BsaveStorage

static void BsaveStorage(  FILE *fp)  {   unsigned long space;   space = sizeof(long) * 3;   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   GenWrite(&NumberOfDefruleModules,(unsigned long) sizeof(long int),fp);   GenWrite(&NumberOfDefrules,(unsigned long) sizeof(long int),fp);   GenWrite(&NumberOfJoins,(unsigned long) sizeof(long int),fp);#if FUZZY_DEFTEMPLATES    GenWrite(&NumberOfPatternFuzzyValues,(unsigned long) sizeof(long int),fp);#endif  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:14,


示例17: WriteNeededIntegers

globle void WriteNeededIntegers(  void *theEnv,  FILE *fp)  {   int i;   INTEGER_HN **integerArray;   INTEGER_HN *integerPtr;   unsigned long int numberOfUsedIntegers = 0;   /*==================================*/   /* Get a copy of the integer table. */   /*==================================*/   integerArray = GetIntegerTable(theEnv);   /*=============================*/   /* Get the number of integers. */   /*=============================*/   for (i = 0 ; i < INTEGER_HASH_SIZE; i++)     {      for (integerPtr = integerArray[i];           integerPtr != NULL;           integerPtr = integerPtr->next)        {         if (integerPtr->neededInteger) numberOfUsedIntegers++;        }     }   /*==========================================================*/   /* Write out the number of integers and the integer values. */   /*==========================================================*/   GenWrite(&numberOfUsedIntegers,(unsigned long) sizeof(unsigned long int),fp);   for (i = 0 ; i < INTEGER_HASH_SIZE; i++)     {      for (integerPtr = integerArray[i];           integerPtr != NULL;           integerPtr = integerPtr->next)        {         if (integerPtr->neededInteger)           {            GenWrite(&integerPtr->contents,                     (unsigned long) sizeof(integerPtr->contents),fp);           }        }     }  }
开发者ID:Chosko,项目名称:CLIPSJNI,代码行数:49,


示例18: BsaveMethodRestrictions

/******************************************************  NAME         : BsaveMethodRestrictions  DESCRIPTION  : Bsaves defgeneric methods' retrictions  INPUTS       : 1) The defgeneric                 2) Output data file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defgeneric methods' restrictions saved  NOTES        : None ******************************************************/static void BsaveMethodRestrictions(  struct constructHeader *theDefgeneric,  void *userBuffer)  {   DEFGENERIC *gfunc = (DEFGENERIC *) theDefgeneric;   BSAVE_RESTRICTION dummy_restriction;   RESTRICTION *rptr;   register unsigned i,j;   for (i = 0 ; i < gfunc->mcnt ; i++)     {      for (j = 0 ; j < gfunc->methods[i].restrictionCount ; j++)        {         rptr = &gfunc->methods[i].restrictions[j];         dummy_restriction.tcnt = rptr->tcnt;         if (rptr->types != NULL)           {            dummy_restriction.types = TypeCount;            TypeCount += rptr->tcnt;           }         else           dummy_restriction.types = -1L;         if (rptr->query != NULL)           {            dummy_restriction.query = ExpressionCount;            ExpressionCount += ExpressionSize(rptr->query);           }         else           dummy_restriction.query = -1L;         GenWrite((void *) &dummy_restriction,                  (unsigned long) sizeof(BSAVE_RESTRICTION),(FILE *) userBuffer);        }     }  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:43,


示例19: BsaveJoin

static void BsaveJoin(  FILE *fp,  struct joinNode *joinPtr)  {   struct bsaveJoinNode tempJoin;   joinPtr->marked = 0;   tempJoin.depth = joinPtr->depth;   tempJoin.rhsType = joinPtr->rhsType;   tempJoin.firstJoin = joinPtr->firstJoin;   tempJoin.logicalJoin = joinPtr->logicalJoin;   tempJoin.joinFromTheRight = joinPtr->joinFromTheRight;   tempJoin.patternIsNegated = joinPtr->patternIsNegated;   if (joinPtr->joinFromTheRight)     { tempJoin.rightSideEntryStructure =  BsaveJoinIndex(joinPtr->rightSideEntryStructure); }   else     { tempJoin.rightSideEntryStructure =  -1L; }   tempJoin.lastLevel =  BsaveJoinIndex(joinPtr->lastLevel);   tempJoin.nextLevel =  BsaveJoinIndex(joinPtr->nextLevel);   tempJoin.rightMatchNode =  BsaveJoinIndex(joinPtr->rightMatchNode);   tempJoin.rightDriveNode =  BsaveJoinIndex(joinPtr->rightDriveNode);   tempJoin.networkTest = HashedExpressionIndex(joinPtr->networkTest);   if (joinPtr->ruleToActivate != NULL)     {      tempJoin.ruleToActivate =         GetDisjunctIndex(joinPtr->ruleToActivate);     }   else     { tempJoin.ruleToActivate = -1L; }   GenWrite(&tempJoin,(unsigned long) sizeof(struct bsaveJoinNode),fp);  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:35,


示例20: BsaveRestrictionTypes

/*************************************************************  NAME         : BsaveRestrictionTypes  DESCRIPTION  : Bsaves defgeneric methods' retrictions' types  INPUTS       : 1) The defgeneric                 2) Output data file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defgeneric methods' restrictions' types saved  NOTES        : None *************************************************************/static void BsaveRestrictionTypes(  struct constructHeader *theDefgeneric,  void *userBuffer)  {   DEFGENERIC *gfunc = (DEFGENERIC *) theDefgeneric;   long dummy_type;   RESTRICTION *rptr;   register unsigned i,j,k;   for (i = 0 ; i < gfunc->mcnt ; i++)     {      for (j = 0 ; j < gfunc->methods[i].restrictionCount ; j++)        {         rptr = &gfunc->methods[i].restrictions[j];         for (k = 0 ; k < rptr->tcnt ; k++)           {#if OBJECT_SYSTEM            dummy_type = DefclassIndex(rptr->types[k]);#else            dummy_type = (long) ((INTEGER_HN *) rptr->types[k])->contents;#endif            GenWrite(&dummy_type,(unsigned long) sizeof(long),(FILE *) userBuffer);           }        }     }  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:35,


示例21: BsaveHandlers

/************************************************************  NAME         : BsaveHandlers  DESCRIPTION  : Writes class message-handlers binary data  INPUTS       : 1) The defclass                 2) The binary file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defclass message-handler binary data written  NOTES        : None ************************************************************/static void BsaveHandlers(  struct constructHeader *theDefclass,  void *buf)  {   DEFCLASS *cls = (DEFCLASS *) theDefclass;   register unsigned i;   BSAVE_HANDLER dummy_handler;   HANDLER *hnd;   for (i = 0 ; i < cls->handlerCount ; i++)     {      hnd = &cls->handlers[i];      dummy_handler.system = hnd->system;      dummy_handler.type = hnd->type;      dummy_handler.minParams = hnd->minParams;      dummy_handler.maxParams = hnd->maxParams;      dummy_handler.localVarCount = hnd->localVarCount;      dummy_handler.cls = DefclassIndex(hnd->cls);      dummy_handler.name = (long) hnd->name->bucket;      if (hnd->actions != NULL)        {         dummy_handler.actions = ExpressionCount;         ExpressionCount += ExpressionSize(hnd->actions);        }      else        dummy_handler.actions = -1L;      GenWrite((void *) &dummy_handler,(UNLN) sizeof(BSAVE_HANDLER),(FILE *) buf);     }  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:38,


示例22: BsaveMethods

/***************************************************  NAME         : BsaveMethods  DESCRIPTION  : Bsaves defgeneric methods  INPUTS       : 1) The defgeneric                 2) Output data file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defgeneric methods saved  NOTES        : None ***************************************************/static void BsaveMethods(  struct constructHeader *theDefgeneric,  void *userBuffer)  {   DEFGENERIC *gfunc = (DEFGENERIC *) theDefgeneric;   DEFMETHOD *meth;   BSAVE_METHOD dummy_method;   register unsigned i;   for (i = 0 ; i < gfunc->mcnt ; i++)     {      meth = &gfunc->methods[i];      dummy_method.index = meth->index;      dummy_method.restrictionCount = meth->restrictionCount;      dummy_method.minRestrictions = meth->minRestrictions;      dummy_method.maxRestrictions = meth->maxRestrictions;      dummy_method.localVarCount = meth->localVarCount;      dummy_method.system = meth->system;      if (meth->restrictions != NULL)        {         dummy_method.restrictions = RestrictionCount;         RestrictionCount += meth->restrictionCount;        }      else        dummy_method.restrictions = -1L;      if (meth->actions != NULL)        {         dummy_method.actions = ExpressionCount;         ExpressionCount += ExpressionSize(meth->actions);        }      else        dummy_method.actions = -1L;      GenWrite((void *) &dummy_method,(unsigned long) sizeof(BSAVE_METHOD),(FILE *) userBuffer);     }  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:44,


示例23: BsaveRestrictionTypes

static void BsaveRestrictionTypes(  void *theEnv,  struct constructHeader *theDefgeneric,  void *userBuffer)  {   DEFGENERIC *gfunc = (DEFGENERIC *) theDefgeneric;   long dummy_type;   RESTRICTION *rptr;   short i,j,k;#if MAC_MCW || WIN_MCW || MAC_XCD#pragma unused(theEnv)#endif   for (i = 0 ; i < gfunc->mcnt ; i++)     {      for (j = 0 ; j < gfunc->methods[i].restrictionCount ; j++)        {         rptr = &gfunc->methods[i].restrictions[j];         for (k = 0 ; k < rptr->tcnt ; k++)           {#if OBJECT_SYSTEM            dummy_type = DefclassIndex(rptr->types[k]);#else            dummy_type = (long) ((INTEGER_HN *) rptr->types[k])->contents;#endif            GenWrite(&dummy_type,sizeof(long),(FILE *) userBuffer);           }        }     }  }
开发者ID:DrItanium,项目名称:DROID-CLIPS,代码行数:30,


示例24: BsaveStorage

static void BsaveStorage(  FILE *fp)  {   unsigned long space;   /*===========================================================*/   /* Only two data structures are saved as part of a defglobal */   /* binary image: the defglobal data structure and the        */   /* defglobalModule data structure.                           */   /*===========================================================*/   space = sizeof(long) * 2;   GenWrite(&space,(unsigned long) sizeof(unsigned long int),fp);   GenWrite(&NumberOfDefglobals,(unsigned long) sizeof(long int),fp);   GenWrite(&NumberOfDefglobalModules,(unsigned long) sizeof(long int),fp);  }
开发者ID:ahmed-masud,项目名称:FuzzyCLIPS,代码行数:16,


示例25: WriteNeededFloats

globle void WriteNeededFloats(  void *theEnv,  FILE *fp)  {   int i;   FLOAT_HN **floatArray;   FLOAT_HN *floatPtr;   unsigned long int numberOfUsedFloats = 0;   /*================================*/   /* Get a copy of the float table. */   /*================================*/   floatArray = GetFloatTable(theEnv);   /*===========================*/   /* Get the number of floats. */   /*===========================*/   for (i = 0; i < FLOAT_HASH_SIZE; i++)     {      for (floatPtr = floatArray[i];           floatPtr != NULL;           floatPtr = floatPtr->next)        { if (floatPtr->neededFloat) numberOfUsedFloats++; }     }   /*======================================================*/   /* Write out the number of floats and the float values. */   /*======================================================*/   GenWrite(&numberOfUsedFloats,(unsigned long) sizeof(unsigned long int),fp);   for (i = 0 ; i < FLOAT_HASH_SIZE; i++)     {      for (floatPtr = floatArray[i];           floatPtr != NULL;           floatPtr = floatPtr->next)        {         if (floatPtr->neededFloat)           { GenWrite(&floatPtr->contents,                      (unsigned long) sizeof(floatPtr->contents),fp); }        }     }  }
开发者ID:Chosko,项目名称:CLIPSJNI,代码行数:45,


示例26: BsaveHandlerMap

/****************************************************************  NAME         : BsaveHandlerMap  DESCRIPTION  : Writes class message-handler map binary data  INPUTS       : 1) The defclass                 2) The binary file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defclass message-handler map binary data written  NOTES        : None ****************************************************************/static void BsaveHandlerMap(  struct constructHeader *theDefclass,  void *buf)  {   DEFCLASS *cls = (DEFCLASS *) theDefclass;   GenWrite((void *) cls->handlerOrderMap,            (UNLN) (sizeof(unsigned) * cls->handlerCount),(FILE *) buf);  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:18,


示例27: BsaveStorage

static void BsaveStorage(  void *theEnv,  EXEC_STATUS,  FILE *fp)  {   size_t space;   /*===========================================================*/   /* Only two data structures are saved as part of a defglobal */   /* binary image: the defglobal data structure and the        */   /* defglobalModule data structure.                           */   /*===========================================================*/   space = sizeof(long) * 2;   GenWrite(&space,sizeof(size_t),fp);   GenWrite(&DefglobalBinaryData(theEnv,execStatus)->NumberOfDefglobals,sizeof(long int),fp);   GenWrite(&DefglobalBinaryData(theEnv,execStatus)->NumberOfDefglobalModules,sizeof(long int),fp);  }
开发者ID:atrniv,项目名称:CLIPS,代码行数:18,


示例28: WriteBinaryFooter

static void WriteBinaryFooter(  void *theEnv,  FILE *fp)  {   char footerBuffer[CONSTRUCT_HEADER_SIZE];   genstrncpy(footerBuffer,BloadData(theEnv)->BinaryPrefixID,CONSTRUCT_HEADER_SIZE);   GenWrite(footerBuffer,(unsigned long) CONSTRUCT_HEADER_SIZE,fp);  }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:9,


示例29: BsaveStorage

static void BsaveStorage(  void *theEnv,  FILE *fp)  {   size_t space;   /*=================================================================*/   /* Only two data structures are saved as part of a deffacts binary */   /* image: the deffacts data structure and the deffactsModule data  */   /* structure. The assertion list expressions are not save with the */   /* deffacts portion of the binary image.                           */   /*=================================================================*/   space = sizeof(long) * 2;   GenWrite(&space,sizeof(size_t),fp);   GenWrite(&DeffactsBinaryData(theEnv)->NumberOfDeffacts,sizeof(long int),fp);   GenWrite(&DeffactsBinaryData(theEnv)->NumberOfDeffactsModules,sizeof(long int),fp);  }
开发者ID:DrItanium,项目名称:durandal,代码行数:18,


示例30: BsaveSlotMap

/***************************************************************  NAME         : BsaveSlotMap  DESCRIPTION  : Writes class canonical slot map binary data  INPUTS       : 1) The defclass                 2) The binary file pointer  RETURNS      : Nothing useful  SIDE EFFECTS : Defclass canonical slot map binary data written  NOTES        : None ***************************************************************/static void BsaveSlotMap(  struct constructHeader *theDefclass,  void *buf)  {   DEFCLASS *cls = (DEFCLASS *) theDefclass;   if (cls->instanceSlotCount != 0)     GenWrite((void *) cls->slotNameMap,              (UNLN) (sizeof(unsigned) * (cls->maxSlotNameID + 1)),(FILE *) buf);  }
开发者ID:OS2World,项目名称:DEV-LISP-Clips,代码行数:19,



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


C++ Gen_Error函数代码示例
C++ GenConstant函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。