本文整理匯總了C++中DefmoduleData函數的典型用法代碼示例。如果您正苦於以下問題:C++ DefmoduleData函數的具體用法?C++ DefmoduleData怎麽用?C++ DefmoduleData使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DefmoduleData函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AllocateDefmoduleGlobals
globle 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;
}
示例2: AddAfterModuleDefinedFunction
globle void AddAfterModuleDefinedFunction(
void *theEnv,
char *name,
void (*func)(void *),
int priority)
{
DefmoduleData(theEnv)->AfterModuleDefinedFunctions =
AddFunctionToCallList(theEnv,name,priority,func,DefmoduleData(theEnv)->AfterModuleDefinedFunctions,TRUE);
}
示例3: AddAfterModuleChangeFunction
void AddAfterModuleChangeFunction(
Environment *theEnv,
const char *name,
VoidCallFunction *func,
int priority,
void *context)
{
DefmoduleData(theEnv)->AfterModuleChangeFunctions =
AddVoidFunctionToCallList(theEnv,name,priority,func,DefmoduleData(theEnv)->AfterModuleChangeFunctions,context);
}
示例4: 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);
}
示例5: RestoreCurrentModule
globle void RestoreCurrentModule(
void *theEnv)
{
MODULE_STACK_ITEM *tmp;
tmp = DefmoduleData(theEnv)->ModuleStack;
DefmoduleData(theEnv)->ModuleStack = tmp->next;
DefmoduleData(theEnv)->CallModuleChangeFunctions = tmp->changeFlag;
DefmoduleData(theEnv)->CurrentModule = tmp->theModule;
rtn_struct(theEnv,moduleStackItem,tmp);
}
示例6: RestoreCurrentModule
void RestoreCurrentModule(
Environment *theEnv)
{
ModuleStackItem *tmp;
tmp = DefmoduleData(theEnv)->ModuleStack;
DefmoduleData(theEnv)->ModuleStack = tmp->next;
DefmoduleData(theEnv)->CallModuleChangeFunctions = tmp->changeFlag;
DefmoduleData(theEnv)->CurrentModule = tmp->theModule;
rtn_struct(theEnv,moduleStackItem,tmp);
}
示例7: SaveCurrentModule
globle void SaveCurrentModule(
void *theEnv)
{
MODULE_STACK_ITEM *tmp;
tmp = get_struct(theEnv,moduleStackItem);
tmp->changeFlag = DefmoduleData(theEnv)->CallModuleChangeFunctions;
DefmoduleData(theEnv)->CallModuleChangeFunctions = FALSE;
tmp->theModule = DefmoduleData(theEnv)->CurrentModule;
tmp->next = DefmoduleData(theEnv)->ModuleStack;
DefmoduleData(theEnv)->ModuleStack = tmp;
}
示例8: SaveCurrentModule
void SaveCurrentModule(
Environment *theEnv)
{
ModuleStackItem *tmp;
tmp = get_struct(theEnv,moduleStackItem);
tmp->changeFlag = DefmoduleData(theEnv)->CallModuleChangeFunctions;
DefmoduleData(theEnv)->CallModuleChangeFunctions = false;
tmp->theModule = DefmoduleData(theEnv)->CurrentModule;
tmp->next = DefmoduleData(theEnv)->ModuleStack;
DefmoduleData(theEnv)->ModuleStack = tmp;
}
示例9: UpdateMenus
/*******************************************************************************
Name: UpdateMenus
Description: Updates the windows if necessary
Arguments: None
Returns: None
*******************************************************************************/
void UpdateMenus()
{
void *theEnv = GetCurrentEnvironment();
static long LastModuleIndex = -1;
Boolean UpdateAll = False;
UpdateWindowsMenu();
if(LastModuleIndex != DefmoduleData(theEnv)->ModuleChangeIndex)
{
UpdateAll = True;
LastModuleIndex = DefmoduleData(theEnv)->ModuleChangeIndex;
}
#if DEFRULE_CONSTRUCT
if((Browse_status[AGENDA_WIN] == True ) ? (UpdateAll || (EnvGetAgendaChanged(theEnv) == CLIPS_TRUE)) : FALSE)
{
EnvSetAgendaChanged(theEnv,CLIPS_FALSE);
PrintChangedAgenda();
}
if((Browse_status[FOCUS_WIN] == True) ? ( UpdateAll || (EnvGetFocusChanged(theEnv) == CLIPS_TRUE)) : FALSE)
{
EnvSetFocusChanged(theEnv,CLIPS_FALSE);
PrintChangedFocus();
}
#endif
#if DEFTEMPLATE_CONSTRUCT
if((Browse_status[FACT_WIN] == True) ? ( UpdateAll || (EnvGetFactListChanged(theEnv) == CLIPS_TRUE)) : FALSE)
{
EnvSetFactListChanged(theEnv,CLIPS_FALSE);
PrintChangedFacts();
}
#endif
#if OBJECT_SYSTEM
if((Browse_status[INSTANCE_WIN]) ? (UpdateAll || (EnvGetInstancesChanged(theEnv) == CLIPS_TRUE)) : FALSE)
{
EnvSetInstancesChanged(theEnv,CLIPS_FALSE);
PrintChangedInstances();
}
#endif
#ifdef DEFGLOBAL_CONSTRUCT
if((Browse_status[GLOBAL_WIN] == True) ? (UpdateAll || (EnvGetGlobalsChanged(theEnv) == CLIPS_TRUE)) : FALSE)
{
EnvSetGlobalsChanged(theEnv,CLIPS_FALSE);
PrintChangedGlobals();
}
#endif
}
示例10: AddPortConstructItem
globle void AddPortConstructItem(
void *theEnv,
char *theName,
int theType)
{
struct portConstructItem *newItem;
newItem = get_struct(theEnv,portConstructItem);
newItem->constructName = theName;
newItem->typeExpected = theType;
newItem->next = DefmoduleData(theEnv)->ListOfPortConstructItems;
DefmoduleData(theEnv)->ListOfPortConstructItems = newItem;
}
示例11: BloadBinaryItem
static void BloadBinaryItem(
void *theEnv)
{
unsigned long int space;
GenReadBinary(theEnv,&space,(unsigned long) sizeof(unsigned long int));
if (DefmoduleData(theEnv)->BNumberOfDefmodules == 0) return;
BloadandRefresh(theEnv,DefmoduleData(theEnv)->BNumberOfDefmodules,(unsigned) sizeof(struct bsaveDefmodule),UpdateDefmodule);
BloadandRefresh(theEnv,DefmoduleData(theEnv)->NumberOfPortItems,(unsigned) sizeof(struct bsavePortItem),UpdatePortItem);
SetListOfDefmodules(theEnv,(void *) DefmoduleData(theEnv)->DefmoduleArray);
EnvSetCurrentModule(theEnv,(void *) EnvGetNextDefmodule(theEnv,NULL));
}
示例12: DefmoduleData
globle void *GetModuleItem(
void *theEnv,
struct defmodule *theModule,
int moduleItemIndex)
{
if (theModule == NULL)
{
if (DefmoduleData(theEnv)->CurrentModule == NULL) return(NULL);
theModule = DefmoduleData(theEnv)->CurrentModule;
}
if (theModule->itemsArray == NULL) return (NULL);
return ((void *) theModule->itemsArray[moduleItemIndex]);
}
示例13: DefmoduleData
void *GetModuleItem(
Environment *theEnv,
Defmodule *theModule,
unsigned moduleItemIndex)
{
if (theModule == NULL)
{
if (DefmoduleData(theEnv)->CurrentModule == NULL) return NULL;
theModule = DefmoduleData(theEnv)->CurrentModule;
}
if (theModule->itemsArray == NULL) return (NULL);
return ((void *) theModule->itemsArray[moduleItemIndex]);
}
示例14: SetModuleItem
void SetModuleItem(
Environment *theEnv,
Defmodule *theModule,
unsigned moduleItemIndex,
void *newValue)
{
if (theModule == NULL)
{
if (DefmoduleData(theEnv)->CurrentModule == NULL) return;
theModule = DefmoduleData(theEnv)->CurrentModule;
}
if (theModule->itemsArray == NULL) return;
theModule->itemsArray[moduleItemIndex] = (struct defmoduleItemHeader *) newValue;
}
示例15: SetModuleItem
globle void SetModuleItem(
void *theEnv,
struct defmodule *theModule,
int moduleItemIndex,
void *newValue)
{
if (theModule == NULL)
{
if (DefmoduleData(theEnv)->CurrentModule == NULL) return;
theModule = DefmoduleData(theEnv)->CurrentModule;
}
if (theModule->itemsArray == NULL) return;
theModule->itemsArray[moduleItemIndex] = (struct defmoduleItemHeader *) newValue;
}