本文整理汇总了C++中Bloaded函数的典型用法代码示例。如果您正苦于以下问题:C++ Bloaded函数的具体用法?C++ Bloaded怎么用?C++ Bloaded使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Bloaded函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnvIsDefmessageHandlerDeletable
/***************************************************
NAME : EnvIsDefmessageHandlerDeletable
DESCRIPTION : Determines if a message-handler
can be deleted
INPUTS : 1) Address of the handler's class
2) Index of the handler
RETURNS : TRUE if deletable, FALSE otherwise
SIDE EFFECTS : None
NOTES : None
***************************************************/
globle int EnvIsDefmessageHandlerDeletable(
void *theEnv,
void *ptr,
unsigned theIndex)
{
#if (MAC_MCW || IBM_MCW) && (RUN_TIME || BLOAD_ONLY)
#pragma unused(theEnv,ptr,theIndex)
#endif
#if BLOAD_ONLY || RUN_TIME
return(FALSE);
#else
DEFCLASS *cls;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv))
return(FALSE);
#endif
cls = (DEFCLASS *) ptr;
if (cls->handlers[theIndex-1].system == 1)
return(FALSE);
return((HandlersExecuting(cls) == FALSE) ? TRUE : FALSE);
#endif
}
示例2: DeallocateDeffactsData
static void DeallocateDeffactsData(
void *theEnv)
{
#if ! RUN_TIME
struct deffactsModule *theModuleItem;
void *theModule;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv)) return;
#endif
DoForAllConstructs(theEnv,DestroyDeffactsAction,DeffactsData(theEnv)->DeffactsModuleIndex,FALSE,NULL);
for (theModule = EnvGetNextDefmodule(theEnv,NULL);
theModule != NULL;
theModule = EnvGetNextDefmodule(theEnv,theModule))
{
theModuleItem = (struct deffactsModule *)
GetModuleItem(theEnv,(struct defmodule *) theModule,
DeffactsData(theEnv)->DeffactsModuleIndex);
rtn_struct(theEnv,deffactsModule,theModuleItem);
}
#else
#if MAC_MCW || WIN_MCW || MAC_XCD
#pragma unused(theEnv)
#endif
#endif
}
示例3: RemoveAllDefinstances
/***************************************************
NAME : RemoveAllDefinstances
DESCRIPTION : Removes all definstances constructs
INPUTS : None
RETURNS : TRUE if successful,
FALSE otherwise
SIDE EFFECTS : All definstances deallocated
NOTES : None
***************************************************/
static intBool RemoveAllDefinstances(
void *theEnv)
{
DEFINSTANCES *dptr,*dhead;
int success = TRUE;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv))
return(FALSE);
#endif
dhead = (DEFINSTANCES *) EnvGetNextDefinstances(theEnv,NULL);
while (dhead != NULL)
{
dptr = dhead;
dhead = (DEFINSTANCES *) EnvGetNextDefinstances(theEnv,(void *) dhead);
if (EnvIsDefinstancesDeletable(theEnv,(void *) dptr))
{
RemoveConstructFromModule(theEnv,(struct constructHeader *) dptr);
RemoveDefinstances(theEnv,(void *) dptr);
}
else
{
DefinstancesDeleteError(theEnv,EnvGetDefinstancesName(theEnv,(void *) dptr));
success = FALSE;
}
}
return(success);
}
示例4: EnvUndefinstances
/***********************************************************
NAME : EnvUndefinstances
DESCRIPTION : Removes a definstance
INPUTS : Address of definstances to remove
RETURNS : TRUE if successful,
FALSE otherwise
SIDE EFFECTS : Definstance deallocated
NOTES : None
***********************************************************/
globle intBool EnvUndefinstances(
void *theEnv,
void *vptr)
{
#if RUN_TIME || BLOAD_ONLY
#if MAC_MCW || WIN_MCW || MAC_XCD
#pragma unused(theEnv,vptr)
#endif
return(FALSE);
#else
DEFINSTANCES *dptr;
dptr = (DEFINSTANCES *) vptr;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv))
return(FALSE);
#endif
if (dptr == NULL)
return(RemoveAllDefinstances(theEnv));
if (EnvIsDefinstancesDeletable(theEnv,vptr) == FALSE)
return(FALSE);
RemoveConstructFromModule(theEnv,(struct constructHeader *) vptr);
RemoveDefinstances(theEnv,(void *) dptr);
return(TRUE);
#endif
}
示例5: EnvIsDefruleDeletable
globle CLIPS_BOOLEAN EnvIsDefruleDeletable(
void *theEnv,
void *vTheDefrule)
{
#if BLOAD_ONLY || RUN_TIME
#if MAC_MCW || IBM_MCW || MAC_XCD
#pragma unused(theEnv,vTheDefrule)
#endif
return(FALSE);
#else
struct defrule *theDefrule;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv)) return(FALSE);
#endif
for (theDefrule = (struct defrule *) vTheDefrule;
theDefrule != NULL;
theDefrule = theDefrule->disjunct)
{ if (theDefrule->executing) return(FALSE); }
if (EngineData(theEnv)->JoinOperationInProgress) return(FALSE);
return(TRUE);
#endif
}
示例6: EnvUndeffunction
/***************************************************
NAME : EnvUndeffunction
DESCRIPTION : External interface routine for
removing a deffunction
INPUTS : Deffunction pointer
RETURNS : FALSE if unsuccessful,
TRUE otherwise
SIDE EFFECTS : Deffunction deleted, if possible
NOTES : None
***************************************************/
globle intBool EnvUndeffunction(
void *theEnv,
EXEC_STATUS,
void *vptr)
{
#if (MAC_MCW || WIN_MCW) && (RUN_TIME || BLOAD_ONLY)
#pragma unused(theEnv,execStatus,vptr)
#endif
#if BLOAD_ONLY || RUN_TIME
return(FALSE);
#else
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv,execStatus) == TRUE)
return(FALSE);
#endif
if (vptr == NULL)
return(RemoveAllDeffunctions(theEnv,execStatus));
if (EnvIsDeffunctionDeletable(theEnv,execStatus,vptr) == FALSE)
return(FALSE);
RemoveConstructFromModule(theEnv,execStatus,(struct constructHeader *) vptr);
RemoveDeffunction(theEnv,execStatus,vptr);
return(TRUE);
#endif
}
示例7: DeallocateDefglobalData
static void DeallocateDefglobalData(
void *theEnv)
{
#if ! RUN_TIME
struct defglobalModule *theModuleItem;
void *theModule;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv)) return;
#endif
DoForAllConstructs(theEnv,DestroyDefglobalAction,DefglobalData(theEnv)->DefglobalModuleIndex,FALSE,NULL);
for (theModule = EnvGetNextDefmodule(theEnv,NULL);
theModule != NULL;
theModule = EnvGetNextDefmodule(theEnv,theModule))
{
theModuleItem = (struct defglobalModule *)
GetModuleItem(theEnv,(struct defmodule *) theModule,
DefglobalData(theEnv)->DefglobalModuleIndex);
rtn_struct(theEnv,defglobalModule,theModuleItem);
}
#else
DoForAllConstructs(theEnv,DestroyDefglobalAction,DefglobalData(theEnv)->DefglobalModuleIndex,FALSE,NULL);
#endif
}
示例8: deleted
/****************************************************************
NAME : ClearDefgenerics
DESCRIPTION : Deletes all generic headers
INPUTS : None
RETURNS : TRUE if all methods deleted, FALSE otherwise
SIDE EFFECTS : Generic headers deleted (and any implicit system
function methods)
NOTES : None
****************************************************************/
globle int ClearDefgenerics(
void *theEnv)
{
register DEFGENERIC *gfunc,*gtmp;
int success = TRUE;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv) == TRUE) return(FALSE);
#endif
gfunc = (DEFGENERIC *) EnvGetNextDefgeneric(theEnv,NULL);
while (gfunc != NULL)
{
gtmp = gfunc;
gfunc = (DEFGENERIC *) EnvGetNextDefgeneric(theEnv,(void *) gfunc);
if (RemoveAllExplicitMethods(theEnv,gtmp) == FALSE)
{
CantDeleteItemErrorMessage(theEnv,(char*)"generic function",EnvGetDefgenericName(theEnv,gtmp));
success = FALSE;
}
else
{
RemoveConstructFromModule(theEnv,(struct constructHeader *) gtmp);
RemoveDefgeneric(theEnv,(void *) gtmp);
}
}
return(success);
}
示例9: RemoveAllDeffunctions
/***************************************************
NAME : RemoveAllDeffunctions
DESCRIPTION : Removes all deffunctions
INPUTS : None
RETURNS : TRUE if all deffunctions
removed, FALSE otherwise
SIDE EFFECTS : Deffunctions removed
NOTES : None
***************************************************/
static intBool RemoveAllDeffunctions(
void *theEnv,
EXEC_STATUS)
{
DEFFUNCTION *dptr,*dtmp;
unsigned oldbusy;
intBool success = TRUE;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv,execStatus) == TRUE)
return(FALSE);
#endif
dptr = (DEFFUNCTION *) EnvGetNextDeffunction(theEnv,execStatus,NULL);
while (dptr != NULL)
{
if (dptr->executing > 0)
{
DeffunctionDeleteError(theEnv,execStatus,EnvGetDeffunctionName(theEnv,execStatus,(void *) dptr));
success = FALSE;
}
else
{
oldbusy = dptr->busy;
ExpressionDeinstall(theEnv,execStatus,dptr->code);
dptr->busy = oldbusy;
ReturnPackedExpression(theEnv,execStatus,dptr->code);
dptr->code = NULL;
}
dptr = (DEFFUNCTION *) EnvGetNextDeffunction(theEnv,execStatus,(void *) dptr);
}
dptr = (DEFFUNCTION *) EnvGetNextDeffunction(theEnv,execStatus,NULL);
while (dptr != NULL)
{
dtmp = dptr;
dptr = (DEFFUNCTION *) EnvGetNextDeffunction(theEnv,execStatus,(void *) dptr);
if (dtmp->executing == 0)
{
if (dtmp->busy > 0)
{
PrintWarningID(theEnv,execStatus,"DFFNXFUN",1,FALSE);
EnvPrintRouter(theEnv,execStatus,WWARNING,"Deffunction ");
EnvPrintRouter(theEnv,execStatus,WWARNING,EnvGetDeffunctionName(theEnv,execStatus,(void *) dtmp));
EnvPrintRouter(theEnv,execStatus,WWARNING," only partially deleted due to usage by other constructs.\n");
SetDeffunctionPPForm((void *) dtmp,NULL);
success = FALSE;
}
else
{
RemoveConstructFromModule(theEnv,execStatus,(struct constructHeader *) dtmp);
RemoveDeffunction(theEnv,execStatus,dtmp);
}
}
}
return(success);
}
示例10: BsaveFind
static void BsaveFind()
{
struct defglobal *defglobalPtr;
struct defmodule *theModule;
/*=======================================================*/
/* If a binary image is already loaded, then temporarily */
/* save the count values since these will be overwritten */
/* in the process of saving the binary image. */
/*=======================================================*/
if (Bloaded())
{
SaveBloadCount(NumberOfDefglobalModules);
SaveBloadCount(NumberOfDefglobals);
}
/*============================================*/
/* Set the count of defglobals and defglobals */
/* module data structures to zero. */
/*============================================*/
NumberOfDefglobals = 0;
NumberOfDefglobalModules = 0;
for (theModule = (struct defmodule *) GetNextDefmodule(NULL);
theModule != NULL;
theModule = (struct defmodule *) GetNextDefmodule(theModule))
{
/*================================================*/
/* Set the current module to the module being */
/* examined and increment the number of defglobal */
/* modules encountered. */
/*================================================*/
SetCurrentModule((void *) theModule);
NumberOfDefglobalModules++;
/*====================================================*/
/* Loop through each defglobal in the current module. */
/*====================================================*/
for (defglobalPtr = (struct defglobal *) GetNextDefglobal(NULL);
defglobalPtr != NULL;
defglobalPtr = (struct defglobal *) GetNextDefglobal(defglobalPtr))
{
/*======================================================*/
/* Initialize the construct header for the binary save. */
/*======================================================*/
MarkConstructHeaderNeededItems(&defglobalPtr->header,NumberOfDefglobals++);
}
}
}
示例11: DeallocateObjectReteData
static void DeallocateObjectReteData(
void *theEnv)
{
OBJECT_PATTERN_NODE *theNetwork;
#if BLOAD || BLOAD_AND_BSAVE
if (Bloaded(theEnv)) return;
#endif
theNetwork = ObjectReteData(theEnv)->ObjectPatternNetworkPointer;
DestroyObjectPatternNetwork(theEnv,theNetwork);
}
示例12: ExpressionCount
/***************************************************************************
NAME : BsaveDeffunctionFind
DESCRIPTION : For all deffunctions, this routine marks all
the needed symbols.
Also, it also counts the number of
expression structures needed.
Also, counts total number of deffunctions.
INPUTS : None
RETURNS : Nothing useful
SIDE EFFECTS : ExpressionCount (a global from BSAVE.C) is incremented
for every expression needed
Symbols are marked in their structures
NOTES : Also sets bsaveIndex for each deffunction (assumes
deffunctions will be bsaved in order of binary list)
***************************************************************************/
static void BsaveDeffunctionFind()
{
if (Bloaded())
{
SaveBloadCount(ModuleCount);
SaveBloadCount(DeffunctionCount);
}
DeffunctionCount = 0L;
ModuleCount = DoForAllConstructs(MarkDeffunctionItems,DeffunctionModuleIndex,
FALSE,NULL);
}
示例13: DeallocateExpressionData
static void DeallocateExpressionData(
void *theEnv)
{
#if ! RUN_TIME
int i;
EXPRESSION_HN *tmpPtr, *nextPtr;
#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE)
if (! Bloaded(theEnv))
#endif
{
for (i = 0; i < EXPRESSION_HASH_SIZE; i++)
{
tmpPtr = ExpressionData(theEnv)->ExpressionHashTable[i];
while (tmpPtr != NULL)
{
nextPtr = tmpPtr->next;
ReturnPackedExpression(theEnv,tmpPtr->exp);
rtn_struct(theEnv,exprHashNode,tmpPtr);
tmpPtr = nextPtr;
}
}
}
rm(theEnv,ExpressionData(theEnv)->ExpressionHashTable,
(int) (sizeof(EXPRESSION_HN *) * EXPRESSION_HASH_SIZE));
#else
#if MAC_MCW || WIN_MCW || MAC_XCD
#pragma unused(theEnv)
#endif
#endif
#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE)
if ((ExpressionData(theEnv)->NumberOfExpressions != 0) && Bloaded(theEnv))
{
genfree(theEnv,(void *) ExpressionData(theEnv)->ExpressionArray,
ExpressionData(theEnv)->NumberOfExpressions * sizeof(struct expr));
}
#endif
}
示例14: 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);
}
示例15: ClearDefmodules
static void ClearDefmodules(
void *theEnv)
{
#if (BLOAD || BLOAD_AND_BSAVE || BLOAD_ONLY) && (! RUN_TIME)
if (Bloaded(theEnv) == TRUE) return;
#endif
#if (! RUN_TIME)
RemoveAllDefmodules(theEnv);
CreateMainModule(theEnv);
DefmoduleData(theEnv)->MainModuleRedefinable = TRUE;
#else
#endif
}