本文整理汇总了C++中store::Item_t::transfer方法的典型用法代码示例。如果您正苦于以下问题:C++ Item_t::transfer方法的具体用法?C++ Item_t::transfer怎么用?C++ Item_t::transfer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类store::Item_t
的用法示例。
在下文中一共展示了Item_t::transfer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XQUERY_EXCEPTION
bool
ZorbaValidateInPlaceIterator::nextImpl(store::Item_t& result, PlanState& planState) const
{
store::Item_t node;
PlanIteratorState* state;
store::PUL_t pul;
DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
if (consumeNext(node, theChild.getp(), planState))
{
// verify that if the element being revalidated is an element it is the root
if (node->getNodeKind()==store::StoreConsts::elementNode &&
node->getParent() &&
node->getParent()->getNodeKind()!=store::StoreConsts::documentNode)
throw XQUERY_EXCEPTION( zerr::ZAPI0090_CANNOT_VALIDATE_NON_ROOT, ERROR_LOC( loc ) );
pul = GENV_ITEMFACTORY->createPendingUpdateList();
pul->addRevalidate(&loc,node);
result.transfer(pul);
STACK_PUSH(true, state);
}
STACK_END(state);
}
示例2: nextImpl
/*******************************************************************************
declare updating function
remove($uri as xs:string) as empty-sequence()
********************************************************************************/
bool RemoveDocumentIterator::nextImpl(
store::Item_t& result,
PlanState& aPlanState) const
{
zstring lRetrievedUriString;
zstring lResolvedUriString;
store::Item_t lUri;
store::Item_t lResolvedUriItem;
store::PUL_t lPul;
PlanIteratorState* state;
DEFAULT_STACK_INIT(PlanIteratorState, state, aPlanState);
consumeNext(lUri, theChildren[0].getp(), aPlanState);
// absolutize retrieved uri
try
{
lUri->getStringValue2(lRetrievedUriString);
lResolvedUriString = theSctx->resolve_relative_uri(lRetrievedUriString, true);
}
catch (ZorbaException const&)
{
RAISE_ERROR(err::FODC0004, loc,
ERROR_PARAMS(lResolvedUriString, ZED(NoResolveRelativeURI)));
}
// check if document exists in the store
if (GENV_STORE.getDocument(lResolvedUriString) == NULL)
{
RAISE_ERROR(zerr::ZXQD0002_DOCUMENT_NOT_VALID, loc,
ERROR_PARAMS(lResolvedUriString, ZED(NoURIInStore)));
}
// create the pul and add the primitive
GENV_ITEMFACTORY->createAnyURI(lResolvedUriItem, lResolvedUriString);
lPul = GENV_ITEMFACTORY->createPendingUpdateList();
lPul->addDeleteDocument(&loc, lResolvedUriItem);
result.transfer(lPul);
STACK_PUSH(result != NULL, state);
STACK_END(state);
}