本文整理汇总了C++中PSLAP_OBJ_MAPPER_OBJECT::GetObjBroker方法的典型用法代码示例。如果您正苦于以下问题:C++ PSLAP_OBJ_MAPPER_OBJECT::GetObjBroker方法的具体用法?C++ PSLAP_OBJ_MAPPER_OBJECT::GetObjBroker怎么用?C++ PSLAP_OBJ_MAPPER_OBJECT::GetObjBroker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PSLAP_OBJ_MAPPER_OBJECT
的用法示例。
在下文中一共展示了PSLAP_OBJ_MAPPER_OBJECT::GetObjBroker方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnscDelTokenChain
ANSC_STATUS
SlapOmoDelObjEntity
(
ANSC_HANDLE hThisObject,
char* path,
BOOL bFreeObjEntity
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PSLAP_OBJ_MAPPER_OBJECT pMyObject = (PSLAP_OBJ_MAPPER_OBJECT )hThisObject;
PSLAP_OBJ_MAPPER_PROPERTY pProperty = (PSLAP_OBJ_MAPPER_PROPERTY)&pMyObject->Property;
PSLAP_OBJ_BROKER_OBJECT pRootObjBroker = (PSLAP_OBJ_BROKER_OBJECT )pMyObject->hRootObjBroker;
PSLAP_OBJ_ENTITY_OBJECT pObjEntity = NULL;
PSLAP_OBJ_BROKER_OBJECT pThisObjBroker = NULL;
PSLAP_OBJ_BROKER_OBJECT pNextObjBroker = NULL;
PANSC_TOKEN_CHAIN pPathTokenChain = NULL;
PANSC_STRING_TOKEN pPathToken = NULL;
pPathTokenChain = (PANSC_TOKEN_CHAIN)AnscAllocateMemory(sizeof(ANSC_TOKEN_CHAIN));
if ( !pPathTokenChain )
{
return ANSC_STATUS_RESOURCES;
}
else
{
returnStatus =
AnscSetTokenChain
(
(ANSC_HANDLE)pPathTokenChain,
path,
SLAP_OBJ_PATH_SEPARATORS
);
}
if ( returnStatus != ANSC_STATUS_SUCCESS )
{
AnscDelTokenChain((ANSC_HANDLE)pPathTokenChain);
AnscFreeMemory ((ANSC_HANDLE)pPathTokenChain);
return returnStatus;
}
else
{
pThisObjBroker =
(PSLAP_OBJ_BROKER_OBJECT)pMyObject->GetObjBroker
(
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)pPathTokenChain
);
AnscDelTokenChain((ANSC_HANDLE)pPathTokenChain);
AnscFreeMemory ((ANSC_HANDLE)pPathTokenChain);
}
if ( pThisObjBroker )
{
pObjEntity = (PSLAP_OBJ_ENTITY_OBJECT)pThisObjBroker->hSlapObjEntity;
if ( pObjEntity )
{
pThisObjBroker->hSlapObjEntity = (ANSC_HANDLE)NULL;
if ( bFreeObjEntity )
{
pObjEntity->Remove((ANSC_HANDLE)pObjEntity);
}
}
}
else
{
return ANSC_STATUS_CANT_FIND;
}
/*
* After removing the associated Obj Entity Object, the Obj Broker Object may have become
* removeable if there's no more Broker Objects currently associated with it. We shall trim all
* the unnecessary branches from the bottom to the top.
*/
while ( pThisObjBroker && (pThisObjBroker != pRootObjBroker) && pThisObjBroker->IsRemoveable((ANSC_HANDLE)pThisObjBroker) )
{
pNextObjBroker = pThisObjBroker;
pThisObjBroker = (PSLAP_OBJ_BROKER_OBJECT)pNextObjBroker->hOwnerContext;
returnStatus =
pThisObjBroker->DelObjBroker
(
(ANSC_HANDLE)pThisObjBroker,
pNextObjBroker->PathName
);
}
return ANSC_STATUS_SUCCESS;
}