这篇教程C++ AllocateEnvironmentData函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AllocateEnvironmentData函数的典型用法代码示例。如果您正苦于以下问题:C++ AllocateEnvironmentData函数的具体用法?C++ AllocateEnvironmentData怎么用?C++ AllocateEnvironmentData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AllocateEnvironmentData函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: InitializeStringRoutergloble void InitializeStringRouter( void *theEnv) { AllocateEnvironmentData(theEnv,STRING_ROUTER_DATA,sizeof(struct stringRouterData),DeallocateStringRouterData); EnvAddRouter(theEnv,(char*)"string",0,FindString,PrintString,GetcString,UngetcString,NULL); }
开发者ID:DrItanium,项目名称:DROID-CLIPS,代码行数:7,
示例2: ProceduralFunctionDefinitionsgloble void ProceduralFunctionDefinitions( void *theEnv) { AllocateEnvironmentData(theEnv,PRCDRFUN_DATA,sizeof(struct procedureFunctionData),DeallocateProceduralFunctionData);#if ! RUN_TIME EnvDefineFunction2(theEnv,"if", 'u', PTIEF IfFunction, "IfFunction", NULL); EnvDefineFunction2(theEnv,"while", 'u', PTIEF WhileFunction, "WhileFunction", NULL); EnvDefineFunction2(theEnv,"loop-for-count",'u', PTIEF LoopForCountFunction, "LoopForCountFunction", NULL); EnvDefineFunction2(theEnv,"(get-loop-count)",'g', PTIEF GetLoopCount, "GetLoopCount", NULL); EnvDefineFunction2(theEnv,"bind", 'u', PTIEF BindFunction, "BindFunction", NULL); EnvDefineFunction2(theEnv,"progn", 'u', PTIEF PrognFunction, "PrognFunction", NULL); EnvDefineFunction2(theEnv,"return", 'u', PTIEF ReturnFunction, "ReturnFunction",NULL); EnvDefineFunction2(theEnv,"break", 'v', PTIEF BreakFunction, "BreakFunction",NULL); EnvDefineFunction2(theEnv,"switch", 'u', PTIEF SwitchFunction, "SwitchFunction",NULL); ProceduralFunctionParsers(theEnv); FuncSeqOvlFlags(theEnv,"progn",FALSE,FALSE); FuncSeqOvlFlags(theEnv,"if",FALSE,FALSE); FuncSeqOvlFlags(theEnv,"while",FALSE,FALSE); FuncSeqOvlFlags(theEnv,"loop-for-count",FALSE,FALSE); FuncSeqOvlFlags(theEnv,"return",FALSE,FALSE); FuncSeqOvlFlags(theEnv,"switch",FALSE,FALSE);#endif EnvAddResetFunction(theEnv,"bind",FlushBindList,0); EnvAddClearFunction(theEnv,"bind",FlushBindList,0); }
开发者ID:DrItanium,项目名称:durandal,代码行数:29,
示例3: InitializeMemorygloble void InitializeMemory( void *theEnv) { AllocateEnvironmentData(theEnv,MEMORY_DATA,sizeof(struct memoryData),NULL); MemoryData(theEnv)->OutOfMemoryFunction = DefaultOutOfMemoryFunction;#if (MEM_TABLE_SIZE > 0) MemoryData(theEnv)->MemoryTable = (struct memoryPtr **) malloc((STD_SIZE) (sizeof(struct memoryPtr *) * MEM_TABLE_SIZE)); if (MemoryData(theEnv)->MemoryTable == NULL) { PrintErrorID(theEnv,"MEMORY",1,TRUE); EnvPrintRouter(theEnv,WERROR,"Out of memory./n"); EnvExitRouter(theEnv,EXIT_FAILURE); } else { int i; for (i = 0; i < MEM_TABLE_SIZE; i++) MemoryData(theEnv)->MemoryTable[i] = NULL; }#else // MEM_TABLE_SIZE == 0 MemoryData(theEnv)->MemoryTable = NULL;#endif }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:27,
示例4: InitializeDefrulesgloble void InitializeDefrules( void *theEnv) { AllocateEnvironmentData(theEnv,DEFRULE_DATA,sizeof(struct defruleData),DeallocateDefruleData); InitializeEngine(theEnv); InitializeAgenda(theEnv); InitializePatterns(theEnv); InitializeDefruleModules(theEnv); AddReservedPatternSymbol(theEnv,"and",NULL); AddReservedPatternSymbol(theEnv,"not",NULL); AddReservedPatternSymbol(theEnv,"or",NULL); AddReservedPatternSymbol(theEnv,"test",NULL); AddReservedPatternSymbol(theEnv,"logical",NULL); AddReservedPatternSymbol(theEnv,"exists",NULL); AddReservedPatternSymbol(theEnv,"forall",NULL); DefruleBasicCommands(theEnv); DefruleCommands(theEnv); DefruleData(theEnv)->DefruleConstruct = AddConstruct(theEnv,"defrule","defrules", ParseDefrule,EnvFindDefrule, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDefrule,SetNextConstruct, EnvIsDefruleDeletable,EnvUndefrule,ReturnDefrule); }
开发者ID:bitcababy,项目名称:ObjectiveCLIPS,代码行数:29,
示例5: ConstructProfilingFunctionDefinitionsgloble void ConstructProfilingFunctionDefinitions( void *theEnv) { struct userDataRecord profileDataInfo = { 0, CreateProfileData, DeleteProfileData }; AllocateEnvironmentData(theEnv,PROFLFUN_DATA,sizeof(struct profileFunctionData),NULL); memcpy(&ProfileFunctionData(theEnv)->ProfileDataInfo,&profileDataInfo,sizeof(struct userDataRecord)); ProfileFunctionData(theEnv)->LastProfileInfo = NO_PROFILE; ProfileFunctionData(theEnv)->PercentThreshold = 0.0; ProfileFunctionData(theEnv)->OutputString = OUTPUT_STRING;#if ! RUN_TIME EnvDefineFunction2(theEnv,"profile",'v', PTIEF ProfileCommand,"ProfileCommand","11w"); EnvDefineFunction2(theEnv,"profile-info",'v', PTIEF ProfileInfoCommand,"ProfileInfoCommand","01w"); EnvDefineFunction2(theEnv,"profile-reset",'v', PTIEF ProfileResetCommand,"ProfileResetCommand","00"); EnvDefineFunction2(theEnv,"set-profile-percent-threshold",'d', PTIEF SetProfilePercentThresholdCommand, "SetProfilePercentThresholdCommand","11n"); EnvDefineFunction2(theEnv,"get-profile-percent-threshold",'d', PTIEF GetProfilePercentThresholdCommand, "GetProfilePercentThresholdCommand","00"); ProfileFunctionData(theEnv)->ProfileDataID = InstallUserDataRecord(theEnv,&ProfileFunctionData(theEnv)->ProfileDataInfo); EnvAddClearFunction(theEnv,"profile",ProfileClearFunction,0);#endif }
开发者ID:atextor,项目名称:derp,代码行数:30,
示例6: ConstructProfilingFunctionDefinitionsvoid ConstructProfilingFunctionDefinitions( Environment *theEnv) { struct userDataRecord profileDataInfo = { 0, CreateProfileData, DeleteProfileData }; AllocateEnvironmentData(theEnv,PROFLFUN_DATA,sizeof(struct profileFunctionData),NULL); memcpy(&ProfileFunctionData(theEnv)->ProfileDataInfo,&profileDataInfo,sizeof(struct userDataRecord)); ProfileFunctionData(theEnv)->LastProfileInfo = NO_PROFILE; ProfileFunctionData(theEnv)->PercentThreshold = 0.0; ProfileFunctionData(theEnv)->OutputString = OUTPUT_STRING;#if ! RUN_TIME AddUDF(theEnv,"profile","v",1,1,"y",ProfileCommand,"ProfileCommand",NULL); AddUDF(theEnv,"profile-info","v",0,0,NULL, ProfileInfoCommand,"ProfileInfoCommand",NULL); AddUDF(theEnv,"profile-reset","v",0,0,NULL,ProfileResetCommand,"ProfileResetCommand",NULL); AddUDF(theEnv,"set-profile-percent-threshold","d",1,1,"ld",SetProfilePercentThresholdCommand,"SetProfilePercentThresholdCommand",NULL); AddUDF(theEnv,"get-profile-percent-threshold","d",0,0,NULL,GetProfilePercentThresholdCommand,"GetProfilePercentThresholdCommand",NULL); ProfileFunctionData(theEnv)->ProfileDataID = InstallUserDataRecord(theEnv,&ProfileFunctionData(theEnv)->ProfileDataInfo); AddClearFunction(theEnv,"profile",ProfileClearFunction,0,NULL);#endif }
开发者ID:DrItanium,项目名称:maya,代码行数:26,
示例7: InitializeConstraintsgloble void InitializeConstraints( void *theEnv) {#if (! RUN_TIME) && (! BLOAD_ONLY) int i;#endif AllocateEnvironmentData(theEnv,CONSTRAINT_DATA,sizeof(struct constraintData),DeallocateConstraintData); ConstraintData(theEnv)->StaticConstraintChecking = TRUE; #if (! RUN_TIME) && (! BLOAD_ONLY) ConstraintData(theEnv)->ConstraintHashtable = (struct constraintRecord **) gm2(theEnv,(int) sizeof (struct constraintRecord *) * SIZE_CONSTRAINT_HASH); if (ConstraintData(theEnv)->ConstraintHashtable == NULL) EnvExitRouter(theEnv,EXIT_FAILURE); for (i = 0; i < SIZE_CONSTRAINT_HASH; i++) ConstraintData(theEnv)->ConstraintHashtable[i] = NULL;#endif#if (! RUN_TIME) EnvDefineFunction2(theEnv,"get-dynamic-constraint-checking",'b',GDCCommand,"GDCCommand", "00"); EnvDefineFunction2(theEnv,"set-dynamic-constraint-checking",'b',SDCCommand,"SDCCommand", "11"); EnvDefineFunction2(theEnv,"get-static-constraint-checking",'b',GSCCommand,"GSCCommand", "00"); EnvDefineFunction2(theEnv,"set-static-constraint-checking",'b',SSCCommand,"SSCCommand", "11");#endif }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:30,
示例8: InitializeDeftemplatesgloble void InitializeDeftemplates( void *theEnv) { globle struct entityRecord deftemplatePtrRecord = { "DEFTEMPLATE_PTR", DEFTEMPLATE_PTR,1,0,0, NULL, NULL,NULL, NULL, NULL, DecrementDeftemplateBusyCount, IncrementDeftemplateBusyCount, NULL,NULL,NULL,NULL }; AllocateEnvironmentData(theEnv,DEFTEMPLATE_DATA,sizeof(struct deftemplateData),DeallocateDeftemplateData); memcpy(&DeftemplateData(theEnv)->DeftemplatePtrRecord,&deftemplatePtrRecord,sizeof(struct entityRecord)); InitializeFacts(theEnv); InitializeDeftemplateModules(theEnv); DeftemplateBasicCommands(theEnv); DeftemplateFunctions(theEnv); DeftemplateData(theEnv)->DeftemplateConstruct = AddConstruct(theEnv,"deftemplate","deftemplates",ParseDeftemplate,EnvFindDeftemplate, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDeftemplate,SetNextConstruct, EnvIsDeftemplateDeletable,EnvUndeftemplate,ReturnDeftemplate); InstallPrimitive(theEnv,(ENTITY_RECORD_PTR) &DeftemplateData(theEnv)->DeftemplatePtrRecord,DEFTEMPLATE_PTR); }
开发者ID:pandaxcl,项目名称:CLIPS-unicode,代码行数:32,
示例9: InitializeAgendagloble void InitializeAgenda( void *theEnv){ AllocateEnvironmentData(theEnv,AGENDA_DATA,sizeof(struct agendaData),NULL); AgendaData(theEnv)->SalienceEvaluation = WHEN_DEFINED; AgendaData(theEnv)->Strategy = DEFAULT_STRATEGY; EnvAddClearFunction(theEnv,(char*)"agenda",AgendaClearFunction,0);#if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,(char*)"activations",1,&AgendaData(theEnv)->WatchActivations,40,DefruleWatchAccess,DefruleWatchPrint);#endif#if ! RUN_TIME EnvDefineFunction2(theEnv,(char*)"refresh", 'v', PTIEF RefreshCommand, (char*)"RefreshCommand", (char*)"11w"); EnvDefineFunction2(theEnv,(char*)"refresh-agenda",'v', PTIEF RefreshAgendaCommand, (char*)"RefreshAgendaCommand", (char*)"01w"); EnvDefineFunction2(theEnv,(char*)"get-salience-evaluation",'w', PTIEF GetSalienceEvaluationCommand, (char*)"GetSalienceEvaluationCommand", (char*)"00"); EnvDefineFunction2(theEnv,(char*)"set-salience-evaluation",'w', PTIEF SetSalienceEvaluationCommand, (char*)"SetSalienceEvaluationCommand", (char*)"11w");#if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"agenda", 'v', PTIEF AgendaCommand, (char*)"AgendaCommand", (char*)"01w");#endif#endif}
开发者ID:DrItanium,项目名称:AdventureEngine,代码行数:34,
示例10: BasicMathFunctionDefinitionsgloble void BasicMathFunctionDefinitions( void *theEnv) { AllocateEnvironmentData(theEnv,BMATHFUN_DATA,sizeof(struct basicMathFunctionData),NULL); BasicMathFunctionData(theEnv)->AutoFloatDividend = TRUE;#if ! RUN_TIME EnvDefineFunction2(theEnv,"+", 'n',PTIEF AdditionFunction, "AdditionFunction", "2*n"); EnvDefineFunction2(theEnv,"*", 'n', PTIEF MultiplicationFunction, "MultiplicationFunction", "2*n"); EnvDefineFunction2(theEnv,"-", 'n', PTIEF SubtractionFunction, "SubtractionFunction", "2*n"); EnvDefineFunction2(theEnv,"/", 'n', PTIEF DivisionFunction, "DivisionFunction", "2*n"); EnvDefineFunction2(theEnv,"div", 'l', PTIEF DivFunction, "DivFunction", "2*n"); EnvDefineFunction2(theEnv,"set-auto-float-dividend", 'b', SetAutoFloatDividendCommand, "SetAutoFloatDividendCommand", "11"); EnvDefineFunction2(theEnv,"get-auto-float-dividend", 'b', GetAutoFloatDividendCommand, "GetAutoFloatDividendCommand", "00"); EnvDefineFunction2(theEnv,"integer", 'l', PTIEF IntegerFunction, "IntegerFunction", "11n"); EnvDefineFunction2(theEnv,"float", 'd', PTIEF FloatFunction, "FloatFunction", "11n"); EnvDefineFunction2(theEnv,"abs", 'n', PTIEF AbsFunction, "AbsFunction", "11n"); EnvDefineFunction2(theEnv,"min", 'n', PTIEF MinFunction, "MinFunction", "2*n"); EnvDefineFunction2(theEnv,"max", 'n', PTIEF MaxFunction, "MaxFunction", "2*n");#endif }
开发者ID:femto,项目名称:rbclips,代码行数:26,
示例11: FileCommandDefinitionsgloble void FileCommandDefinitions( void *theEnv) { AllocateEnvironmentData(theEnv,FILECOM_DATA,sizeof(struct fileCommandData),DeallocateFileCommandData);#if ! RUN_TIME#if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,"batch",'b',PTIEF BatchCommand,"BatchCommand","11k"); EnvDefineFunction2(theEnv,"batch*",'b',PTIEF BatchStarCommand,"BatchStarCommand","11k"); EnvDefineFunction2(theEnv,"dribble-on",'b',PTIEF DribbleOnCommand,"DribbleOnCommand","11k"); EnvDefineFunction2(theEnv,"dribble-off",'b',PTIEF DribbleOffCommand,"DribbleOffCommand","00"); EnvDefineFunction2(theEnv,"save",'b',PTIEF SaveCommand,"SaveCommand","11k");#endif EnvDefineFunction2(theEnv,"load",'b',PTIEF LoadCommand,"LoadCommand","11k"); EnvDefineFunction2(theEnv,"load*",'b',PTIEF LoadStarCommand,"LoadStarCommand","11k");#if BLOAD_AND_BSAVE InitializeBsaveData(theEnv); EnvDefineFunction2(theEnv,"bsave",'b', PTIEF BsaveCommand,"BsaveCommand","11k");#endif#if BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE InitializeBloadData(theEnv); EnvDefineFunction2(theEnv,"bload",'b',PTIEF BloadCommand,"BloadCommand","11k");#endif#endif }
开发者ID:ricksladkey,项目名称:CLIPS,代码行数:25,
示例12: InitializeConstraintsvoid InitializeConstraints( Environment *theEnv) {#if (! RUN_TIME) && (! BLOAD_ONLY) int i;#endif AllocateEnvironmentData(theEnv,CONSTRAINT_DATA,sizeof(struct constraintData),DeallocateConstraintData);#if (! RUN_TIME) && (! BLOAD_ONLY) ConstraintData(theEnv)->ConstraintHashtable = (struct constraintRecord **) gm2(theEnv,sizeof (struct constraintRecord *) * SIZE_CONSTRAINT_HASH); if (ConstraintData(theEnv)->ConstraintHashtable == NULL) ExitRouter(theEnv,EXIT_FAILURE); for (i = 0; i < SIZE_CONSTRAINT_HASH; i++) ConstraintData(theEnv)->ConstraintHashtable[i] = NULL;#endif#if (! RUN_TIME) AddUDF(theEnv,"get-dynamic-constraint-checking","b",0,0,NULL,GDCCommand,"GDCCommand",NULL); AddUDF(theEnv,"set-dynamic-constraint-checking","b",1,1,NULL,SDCCommand,"SDCCommand",NULL);#endif }
开发者ID:DrItanium,项目名称:maya,代码行数:25,
示例13: AllocateDefmoduleGlobalsgloble void AllocateDefmoduleGlobals( void *theEnv) { AllocateEnvironmentData(theEnv,DEFMODULE_DATA,sizeof(struct defmoduleData),NULL); AddEnvironmentCleanupFunction(theEnv,"defmodules",DeallocateDefmoduleData,-1000); DefmoduleData(theEnv)->CallModuleChangeFunctions = TRUE; DefmoduleData(theEnv)->MainModuleRedefinable = TRUE; }
开发者ID:bigsmiles,项目名称:eventCLIPS,代码行数:8,
示例14: SortFunctionDefinitionsgloble void SortFunctionDefinitions( void *theEnv) { AllocateEnvironmentData(theEnv,SORTFUN_DATA,sizeof(struct sortFunctionData),DeallocateSortFunctionData);#if ! RUN_TIME EnvDefineFunction2(theEnv,"sort",'u', PTIEF SortFunction,"SortFunction","1**w");#endif }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:8,
示例15: InitializePatternsgloble void InitializePatterns( void *theEnv) { AllocateEnvironmentData(theEnv,PATTERN_DATA,sizeof(struct patternData),DeallocatePatternData); PatternData(theEnv)->NextPosition = 1; PatternData(theEnv)->PatternHashTable = CreatePatternHashTable(theEnv,SIZE_PATTERN_HASH); PatternData(theEnv)->PatternHashTableSize = SIZE_PATTERN_HASH; }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:8,
示例16: InitializePrettyPrintDatagloble void InitializePrettyPrintData( void *theEnv, EXEC_STATUS) { AllocateEnvironmentData(theEnv,execStatus,PRETTY_PRINT_DATA,sizeof(struct prettyPrintData),DeallocatePrettyPrintData); PrettyPrintData(theEnv,execStatus)->PPBufferEnabled = TRUE; }
开发者ID:atrniv,项目名称:CLIPS,代码行数:8,
示例17: InitializeStringRoutervoid InitializeStringRouter( Environment *theEnv) { AllocateEnvironmentData(theEnv,STRING_ROUTER_DATA,sizeof(struct stringRouterData),DeallocateStringRouterData); AddRouter(theEnv,"string",0,QueryStringCallback,WriteStringCallback,ReadStringCallback,UnreadStringCallback,NULL,NULL); AddRouter(theEnv,"stringBuilder",0,QueryStringBuilderCallback,WriteStringBuilderCallback,NULL,NULL,NULL,NULL); }
开发者ID:DrItanium,项目名称:maya,代码行数:8,
示例18: InitializeBloadDatagloble void InitializeBloadData( void *theEnv) { AllocateEnvironmentData(theEnv,BLOAD_DATA,sizeof(struct bloadData),NULL); AddEnvironmentCleanupFunction(theEnv,"bload",DeallocateBloadData,-1500); BloadData(theEnv)->BinaryPrefixID = "/1/2/3/4CLIPS"; BloadData(theEnv)->BinaryVersionID = "V6.20"; }
开发者ID:atextor,项目名称:derp,代码行数:9,
示例19: InitializeEvaluationDatagloble void InitializeEvaluationData( void *theEnv) { struct externalAddressType cPointer = { "C", PrintCAddress, PrintCAddress, NULL, NewCAddress, NULL }; AllocateEnvironmentData(theEnv,EVALUATION_DATA,sizeof(struct evaluationData),DeallocateEvaluationData); InstallExternalAddressType(theEnv,&cPointer); }
开发者ID:chrislong,项目名称:clipsrules,代码行数:9,
示例20: InitializeFileRoutergloble void InitializeFileRouter( void *theEnv) { AllocateEnvironmentData(theEnv,FILE_ROUTER_DATA,sizeof(struct fileRouterData),DeallocateFileRouterData); EnvAddRouter(theEnv,"fileio",0,FindFile, PrintFile,GetcFile, UngetcFile,ExitFile); }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:9,
示例21: InitializeConstructDatagloble void InitializeConstructData( void *theEnv) { AllocateEnvironmentData(theEnv,CONSTRUCT_DATA,sizeof(struct constructData),DeallocateConstructData);#if (! RUN_TIME) && (! BLOAD_ONLY) ConstructData(theEnv)->WatchCompilations = ON;#endif }
开发者ID:Khenji55,项目名称:Computacion_UCLM,代码行数:9,
示例22: ParseFunctionDefinitionsgloble void ParseFunctionDefinitions( void *theEnv) { AllocateEnvironmentData(theEnv,PARSEFUN_DATA,sizeof(struct parseFunctionData),NULL);#if ! RUN_TIME EnvDefineFunction2(theEnv,"check-syntax",'u',PTIEF CheckSyntaxFunction,"CheckSyntaxFunction","11s");#endif }
开发者ID:aliverobotics,项目名称:Pumas-SmallSize,代码行数:9,
示例23: InitializeCommandLineDatavoid InitializeCommandLineData( void *theEnv) { AllocateEnvironmentData(theEnv,COMMANDLINE_DATA,sizeof(struct commandLineData),DeallocateCommandLineData);#if ! RUN_TIME CommandLineData(theEnv)->BannerString = BANNER_STRING; CommandLineData(theEnv)->EventFunction = DefaultGetNextEvent;#endif }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:10,
示例24: InitializeEnginegloble void InitializeEngine( void *theEnv) { AllocateEnvironmentData(theEnv,ENGINE_DATA,sizeof(struct engineData),DeallocateEngineData); EngineData(theEnv)->IncrementalResetFlag = TRUE; #if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,"statistics",0,&EngineData(theEnv)->WatchStatistics,20,NULL,NULL); AddWatchItem(theEnv,"focus",0,&EngineData(theEnv)->WatchFocus,0,NULL,NULL);#endif }
开发者ID:femto,项目名称:rbclips,代码行数:12,
示例25: InitializeDefaultRoutersgloble void InitializeDefaultRouters( void *theEnv) { AllocateEnvironmentData(theEnv,ROUTER_DATA,sizeof(struct routerData),DeallocateRouterData); RouterData(theEnv)->CommandBufferInputCount = -1; #if (! RUN_TIME) EnvDefineFunction2(theEnv,"exit", 'v', PTIEF ExitCommand, "ExitCommand", "*1i");#endif InitializeFileRouter(theEnv); InitializeStringRouter(theEnv); }
开发者ID:aliverobotics,项目名称:Pumas-SmallSize,代码行数:13,
示例26: SetupObjectSystem/********************************************************** NAME : SetupObjectSystem DESCRIPTION : Initializes all COOL constructs, functions, and data structures INPUTS : None RETURNS : Nothing useful SIDE EFFECTS : COOL initialized NOTES : Order of setup calls is important **********************************************************/globle void SetupObjectSystem( void *theEnv){ ENTITY_RECORD defclassEntityRecord = { (char*)"DEFCLASS_PTR", DEFCLASS_PTR,1,0,0, NULL,NULL,NULL,NULL,NULL, DecrementDefclassBusyCount, IncrementDefclassBusyCount, NULL,NULL,NULL,NULL,NULL }; AllocateEnvironmentData(theEnv,DEFCLASS_DATA,sizeof(struct defclassData),NULL); AddEnvironmentCleanupFunction(theEnv,(char*)"defclasses",DeallocateDefclassData,-500); memcpy(&DefclassData(theEnv)->DefclassEntityRecord,&defclassEntityRecord,sizeof(struct entityRecord));#if ! RUN_TIME DefclassData(theEnv)->ClassDefaultsMode = CONVENIENCE_MODE; DefclassData(theEnv)->ISA_SYMBOL = (SYMBOL_HN *) EnvAddSymbol(theEnv,SUPERCLASS_RLN); IncrementSymbolCount(DefclassData(theEnv)->ISA_SYMBOL); DefclassData(theEnv)->NAME_SYMBOL = (SYMBOL_HN *) EnvAddSymbol(theEnv,NAME_RLN); IncrementSymbolCount(DefclassData(theEnv)->NAME_SYMBOL);#if DEFRULE_CONSTRUCT DefclassData(theEnv)->INITIAL_OBJECT_SYMBOL = (SYMBOL_HN *) EnvAddSymbol(theEnv,INITIAL_OBJECT_NAME); IncrementSymbolCount(DefclassData(theEnv)->INITIAL_OBJECT_SYMBOL);#endif#endif SetupDefclasses(theEnv); SetupInstances(theEnv); SetupMessageHandlers(theEnv);#if DEFINSTANCES_CONSTRUCT SetupDefinstances(theEnv);#endif#if INSTANCE_SET_QUERIES SetupQuery(theEnv);#endif#if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY SetupObjectsBload(theEnv);#endif#if CONSTRUCT_COMPILER && (! RUN_TIME) SetupObjectsCompiler(theEnv);#endif#if DEFRULE_CONSTRUCT SetupObjectPatternStuff(theEnv);#endif}
开发者ID:DrItanium,项目名称:AdventureEngine,代码行数:60,
示例27: InitializeDefaultRoutersvoid InitializeDefaultRouters( void *theEnv) { AllocateEnvironmentData(theEnv,ROUTER_DATA,sizeof(struct routerData),DeallocateRouterData); RouterData(theEnv)->CommandBufferInputCount = 0; RouterData(theEnv)->AwaitingInput = true; #if (! RUN_TIME) EnvAddUDF(theEnv,"exit", "v", ExitCommand, "ExitCommand", 0,1,"l",NULL);#endif InitializeFileRouter(theEnv); InitializeStringRouter(theEnv); }
开发者ID:guitarpoet,项目名称:php-clips,代码行数:14,
示例28: InitializeUtilityDatagloble void InitializeUtilityData( void *theEnv) { AllocateEnvironmentData(theEnv,UTILITY_DATA,sizeof(struct utilityData),DeallocateUtilityData); UtilityData(theEnv)->GarbageCollectionLocks = 0; UtilityData(theEnv)->GarbageCollectionHeuristicsEnabled = TRUE; UtilityData(theEnv)->PeriodicFunctionsEnabled = TRUE; UtilityData(theEnv)->YieldFunctionEnabled = TRUE; UtilityData(theEnv)->CurrentEphemeralCountMax = MAX_EPHEMERAL_COUNT; UtilityData(theEnv)->CurrentEphemeralSizeMax = MAX_EPHEMERAL_SIZE; UtilityData(theEnv)->LastEvaluationDepth = -1; }
开发者ID:aliverobotics,项目名称:Pumas-SmallSize,代码行数:14,
示例29: InitializeDeffactsgloble void InitializeDeffacts( void *theEnv) { AllocateEnvironmentData(theEnv,DEFFACTS_DATA,sizeof(struct deffactsData),DeallocateDeffactsData); InitializeDeffactsModules(theEnv); DeffactsBasicCommands(theEnv); DeffactsData(theEnv)->DeffactsConstruct = AddConstruct(theEnv,"deffacts","deffacts",ParseDeffacts,EnvFindDeffacts, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDeffacts,SetNextConstruct, EnvIsDeffactsDeletable,EnvUndeffacts,ReturnDeffacts); }
开发者ID:Anusaaraka,项目名称:anusaaraka,代码行数:15,
示例30: SetupDeffunctionsBload/*********************************************************** NAME : SetupDeffunctionsBload DESCRIPTION : Initializes data structures and routines for binary loads of deffunctions INPUTS : None RETURNS : Nothing useful SIDE EFFECTS : Routines defined and structures initialized NOTES : None ***********************************************************/globle void SetupDeffunctionsBload( void *theEnv){ AllocateEnvironmentData(theEnv,DFFNXBIN_DATA,sizeof(struct deffunctionBinaryData),DeallocateDeffunctionBloadData);#if BLOAD_AND_BSAVE AddBinaryItem(theEnv,"deffunctions",0,BsaveDeffunctionFind,BsaveDeffunctionExpressions, BsaveStorageDeffunctions,BsaveDeffunctions, BloadStorageDeffunctions,BloadDeffunctions, ClearDeffunctionBload);#else AddBinaryItem(theEnv,"deffunctions",0,NULL,NULL,NULL,NULL, BloadStorageDeffunctions,BloadDeffunctions, ClearDeffunctionBload);#endif}
开发者ID:ricksladkey,项目名称:CLIPS,代码行数:24,
注:本文中的AllocateEnvironmentData函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AllocateFile函数代码示例 C++ AllocateDir函数代码示例 |