您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DEFAULT_STACK_INIT函数代码示例

51自学网 2021-06-01 20:20:36
  C++
这篇教程C++ DEFAULT_STACK_INIT函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DEFAULT_STACK_INIT函数的典型用法代码示例。如果您正苦于以下问题:C++ DEFAULT_STACK_INIT函数的具体用法?C++ DEFAULT_STACK_INIT怎么用?C++ DEFAULT_STACK_INIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DEFAULT_STACK_INIT函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DEFAULT_STACK_INIT

bool CastableIterator::nextImpl(store::Item_t& result, PlanState& planState) const{  bool res;  store::Item_t item;  TypeManager* tm = theSctx->get_typemanager();  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  if (!consumeNext(item, theChild.getp(), planState))  {    res = theAllowEmpty;  }  else  {    res = GenericCast::isCastable(item, theCastType, tm);    if (consumeNext(item, theChild.getp(), planState))    {      res = false;    }  }  STACK_PUSH(GENV_ITEMFACTORY->createBoolean(result, res), state);  STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:27,


示例2: DEFAULT_STACK_INIT

boolDeleteIterator::nextImpl(store::Item_t& result, PlanState& aPlanState) const{   store::Item_t target;  std::unique_ptr<store::PUL> pul;  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, aPlanState);  pul.reset(GENV_ITEMFACTORY->createPendingUpdateList());  while (consumeNext(target, theChild, aPlanState))  {    if (!target->isNode())      throw XQUERY_EXCEPTION( err::XUTY0007, ERROR_LOC( loc ) );    areNodeModifiersViolated(theSctx, target, loc);    pul->addDelete(&loc, target);  }  result = pul.release();  STACK_PUSH(true, state);  STACK_END(state);}
开发者ID:buchenberg,项目名称:zorba,代码行数:25,


示例3: DEFAULT_STACK_INIT

boolIsFollowingSiblingPositionIterator::nextImpl(store::Item_t& result, PlanState& planState) const{  store::Item_t lUriA;  store::Item_t lUriB;  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  consumeNext(lUriA, theChildren[0].getp(), planState);  consumeNext(lUriB, theChildren[1].getp(), planState);  try  {    GENV_ITEMFACTORY->createBoolean(result, lUriA->isFollowingSibling(lUriB));  }  catch (ZorbaException& e)  {    set_source(e, loc);    throw;  }  STACK_PUSH(true,state);  STACK_END (state);}
开发者ID:alyst,项目名称:zorba,代码行数:26,


示例4: DEFAULT_STACK_INIT

bool JSoundValidateIterator::nextImpl( store::Item_t &result,                                       PlanState &plan_state ) const {  bool cast = cast_default;  store::Item_t jsd_item, type_item, json_item, options_item;  PlanIteratorState *state;  DEFAULT_STACK_INIT( PlanIteratorState, state, plan_state );  consumeNext( jsd_item, theChildren[0], plan_state );  consumeNext( type_item, theChildren[1], plan_state );  consumeNext( json_item, theChildren[2], plan_state );  consumeNext( options_item, theChildren[3], plan_state );  try {    get_bool_opt( options_item, "cast-atomic-values", &cast );    jsound::schema const schema( jsd_item );    GENV_ITEMFACTORY->createBoolean(      result, schema.validate( json_item, type_item->getStringValue(), cast )    );  }  catch ( ZorbaException &e ) {    set_source( e, loc, false );    throw;  }  STACK_PUSH( true, state );  STACK_END( state );}
开发者ID:zorba-processor,项目名称:zorba,代码行数:28,


示例5: DEFAULT_STACK_INIT

bool FunctionNameIterator::nextImpl(    store::Item_t& r,    PlanState& planState) const{  store::Item_t lFItem;  FunctionItem* lFunctionItem = 0;  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  consumeNext(lFItem, theChildren[0], planState);  // function signature guarantees that  ZORBA_ASSERT(lFItem->isFunction());  lFunctionItem = static_cast<FunctionItem*>(lFItem.getp());  if ((!lFunctionItem->isInline() || lFunctionItem->isCoercion())      &&      lFunctionItem->getFunctionName()      &&      (lFunctionItem->getArity() == lFunctionItem->getStartArity()))  {    // non-inline function    r = lFunctionItem->getFunctionName();    STACK_PUSH(true, state);  }  STACK_END(state);}
开发者ID:zorba-processor,项目名称:zorba,代码行数:30,


示例6: DEFAULT_STACK_INIT

/*******************************************************************************  declare function  is-available-document($uri as xs:string) as xs:boolean********************************************************************************/bool IsAvailableDocumentIterator::nextImpl(    store::Item_t& result,    PlanState& aPlanState) const{  zstring       lRetrievedUriString;  zstring       lResolvedUriString;  store::Item_t lUri;  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  GENV_ITEMFACTORY->  createBoolean(result, GENV_STORE.getDocument(lResolvedUriString) != NULL);  STACK_PUSH(true, state);  STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:37,


示例7: getTypeManager

bool SeqValueIntersectIterator::nextImpl( store::Item_t &result,                                          PlanState &plan_state ) const {  XQPCollator *const coll = theSctx->get_default_collator( loc );  store::Item_t item;  TypeManager *const tm = getTypeManager();  long tz;  SeqValueIntersectIteratorState *state;  DEFAULT_STACK_INIT( SeqValueIntersectIteratorState, state, plan_state );  tz = plan_state.theLocalDynCtx->get_implicit_timezone();  state->set_[0] = new_Item_set( tm, tz, coll, loc );  state->set_[1] = new_Item_set( tm, tz, coll, loc );  while ( consumeNext( item, theChildren[0], plan_state ) )    if ( state->set_[0]->insert( item.getp() ).second )      item->addReference();  while ( consumeNext( item, theChildren[1], plan_state ) )    if ( ztd::contains( *state->set_[0], item.getp() ) &&         state->set_[1]->insert( item.getp() ).second ) {      item->addReference();      result = item;      STACK_PUSH( true, state );    }  delete_Item_set( state->set_[0] );  delete_Item_set( state->set_[1] );  STACK_END( state );}
开发者ID:zorba-processor,项目名称:zorba,代码行数:31,


示例8: DEFAULT_STACK_INIT

boolIndexKeysIterator::nextImpl(    store::Item_t& result,    PlanState& aPlanState) const{  store::Item_t    lQName;  IndexDecl_t      indexDecl;  store::IndexKey  lKey;  store::Item_t lKeyNodeName;  GENV_ITEMFACTORY->createQName(lKeyNodeName,      static_context::ZORBA_STORE_UNORDERED_MAPS_FN_NS,      "", "key");  IndexKeysIteratorState* state;  DEFAULT_STACK_INIT(IndexKeysIteratorState, state, aPlanState);  consumeNext(lQName, theChildren[0].getp(), aPlanState);  if ((indexDecl = theSctx->lookup_index(lQName)) == NULL)  {    throw XQUERY_EXCEPTION(      zerr::ZDDY0021_INDEX_NOT_DECLARED,      ERROR_PARAMS( lQName->getStringValue() ),      ERROR_LOC( loc )    );  }  state->theIndex = GENV_STORE.getIndex(lQName);  if (!state->theIndex)  {    throw XQUERY_EXCEPTION(      zerr::ZDDY0023_INDEX_DOES_NOT_EXIST,      ERROR_PARAMS( lQName->getStringValue() ),      ERROR_LOC( loc )    );  }  state->theIter = state->theIndex->keys();  state->theIter->open();  // generate result elements of the form  // <key>  //   <attribute value="key1_value"/>  //   <attribute value="key2_value"/>  //   <attribute value="key3_value"/>  // </key>  while (state->theIter->next(lKey))  {    IndexUtil::createIndexKeyElement(        state->theIndex->getSpecification().theIsGeneral,        result, lKey, static_context::ZORBA_STORE_STATIC_INDEXES_DML_FN_NS      );    STACK_PUSH(true, state);  }  STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:60,


示例9: DEFAULT_STACK_INIT

bool SpecificNumArithIterator<Operation, Type>::nextImpl(    store::Item_t& result,    PlanState& planState) const{  bool res;  store::Item_t n0;  store::Item_t n1;    PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  if (this->consumeNext(n0, this->theChild0.getp(), planState))  {    if (this->consumeNext(n1, this->theChild1.getp(), planState))    {      assert(n0->isAtomic());      assert(n1->isAtomic());      res = Operation::template       computeSingleType<Type>(result, NULL, NULL, &this->loc, n0.getp(), n1.getp());      STACK_PUSH(res, state);    }  }  STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:26,


示例10: DEFAULT_STACK_INIT

bool JSONtoXMLInternal::nextImpl( store::Item_t& result,                                  PlanState &planState ) const {  store::Item_t item;  options_type options;  PlanIteratorState *state;  DEFAULT_STACK_INIT( PlanIteratorState, state, planState );  ZORBA_ASSERT( theChildren.size() == 2 );  consumeNext( item, theChildren[1], planState );  get_options( item, &options );  consumeNext( item, theChildren[0], planState );  result = nullptr;  { // local scope  options_type::mapped_type const &format_opt = options[ "json-format" ];  ZORBA_ASSERT( !format_opt.empty() );  if ( format_opt == "Snelson" )    snelson::json_to_xml( item, &result );  else if ( format_opt == "JsonML" || format_opt == "JsonML-array" )    jsonml_array::json_to_xml( item, &result );  else if ( format_opt == "JsonML-object" )    jsonml_object::json_to_xml( item, &result );  else    ZORBA_ASSERT( false );  } // local scope  STACK_PUSH( !!result, state );  STACK_END( state );}
开发者ID:cezarfx,项目名称:zorba,代码行数:31,


示例11: DEFAULT_STACK_INIT

boolZorbaValidateInPlaceIterator::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);}
开发者ID:zorba-processor,项目名称:zorba,代码行数:28,


示例12: DEFAULT_STACK_INIT

bool IfThenElseIterator::nextImpl(store::Item_t& result, PlanState& planState) const{  IfThenElseIteratorState* state;  DEFAULT_STACK_INIT(IfThenElseIteratorState, state, planState);  if (theIsBooleanIter)   {    store::Item_t condResult;    consumeNext ( condResult, theCondIter.getp(), planState );    state->theThenUsed = condResult->getBooleanValue();  }  else  {    state->theThenUsed = FnBooleanIterator::effectiveBooleanValue(this->loc,                                                                  planState,                                                                  theCondIter);  }  while (true)  {    STACK_PUSH(consumeNext(result,                           (state->theThenUsed ? theThenIter.getp() : theElseIter.getp()),                           planState),                state);  }  STACK_END(state);}
开发者ID:cezarfx,项目名称:zorba,代码行数:28,


示例13: DEFAULT_STACK_INIT

bool ForIterator::nextImpl(store::Item_t& aResult, PlanState& aPlanState) const {  ForState* lState;  store::Item_t lItem;        DEFAULT_STACK_INIT(ForState, lState, aPlanState);  while (consumeNext(aResult, theChild0, aPlanState))   {    while (consumeNext(lItem, theChild1, aPlanState))     {      bindVariables(lItem, theVarRefs, aPlanState);      if (theHasPosVars)       {        store::Item_t lPosItem;        GENV_ITEMFACTORY->createInteger(lPosItem,                                        xs_integer(lState->incReturnPosition()));        bindVariables(lPosItem, thePosVarRefs, aPlanState);      }      STACK_PUSH(true, lState);    }    lState->resetPosition();    theChild1->reset(aPlanState);  }  STACK_END(lState);}
开发者ID:zorba-processor,项目名称:zorba,代码行数:30,


示例14: DEFAULT_STACK_INIT

/*******************************************************************************  14.9.2 fn:parse-xml-fragment********************************************************************************/bool FnParseXmlFragmentIterator::nextImpl(    store::Item_t& result,    PlanState& planState) const{  zstring docString;  FnParseXmlFragmentIteratorState* state;  DEFAULT_STACK_INIT(FnParseXmlFragmentIteratorState, state, planState);  if (consumeNext(result, theChildren[0].getp(), planState))  {    if (result->isStreamable())    {      state->theFragmentStream.theStream = &result->getStream();    }    else    {      result->getStringValue2(docString);      state->theFragmentStream.theIss = new std::istringstream(docString.c_str());      state->theFragmentStream.theStream = state->theFragmentStream.theIss;    }    state->theProperties.setBaseUri(theSctx->get_base_uri());    state->theProperties.setParseExternalParsedEntity(true);    state->theProperties.setStoreDocument(false);    state->baseUri = state->theProperties.getBaseUri();        // create only one document node holding all fragment nodes    state->theFragmentStream.only_one_doc_node = 1;           try    {      result = GENV.getStore().loadDocument(state->baseUri,                                            state->docUri,                                            state->theFragmentStream,                                            state->theProperties);    }    catch ( ZorbaException const &e )    {      if ( !state->theProperties.getNoError() )      {        XQueryException xe(          XQUERY_EXCEPTION(err::FODC0006,          ERROR_PARAMS( "fn:parse-xml-fragment()", e.what() ),          ERROR_LOC( loc )));        set_data( xe, e );        throw xe;      }      result = nullptr;    }    if (result != NULL)      STACK_PUSH(true, state);  } // if   STACK_END(state);}
开发者ID:zorba-processor,项目名称:zorba,代码行数:62,


示例15: DEFAULT_STACK_INIT

bool ExitIterator::nextImpl(store::Item_t& result, PlanState& planState) const {  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  throw ExitException(new PlanIteratorWrapper(theChild, planState));      STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:9,


示例16: put

/*******************************************************************************  declare updating function  put($uri as xs:string, $doc as xs:document-node()) as empty-sequence()********************************************************************************/bool PutDocumentIterator::nextImpl(    store::Item_t& result,    PlanState& aPlanState) const{  zstring       lRetrievedUriString;  zstring       lResolvedUriString;  store::Item_t lUri;  store::Item_t lDoc;  store::Item_t lResolvedUriItem;  std::unique_ptr<store::PUL> 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 already exists in the store  if (GENV_STORE.getDocument(lResolvedUriString) != NULL)  {    RAISE_ERROR(zerr::ZAPI0020_DOCUMENT_ALREADY_EXISTS, loc,    ERROR_PARAMS(lResolvedUriString));  }  // create the pul and add the primitive  GENV_ITEMFACTORY->createAnyURI(lResolvedUriItem, lResolvedUriString);  lPul.reset(GENV_ITEMFACTORY->createPendingUpdateList());  consumeNext(lDoc, theChildren[1].getp(), aPlanState);  lPul->addCreateDocument(&loc, lResolvedUriItem, lDoc);  result = lPul.release();  STACK_PUSH(result != NULL, state);  STACK_END(state);}
开发者ID:alyst,项目名称:zorba,代码行数:52,


示例17: count

bool PlanIterator::count(store::Item_t& result, PlanState& planState) const{  store::Item_t item;  xs_integer count(0);  PlanIteratorState* state;  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);  while (consumeNext(item, this, planState))  {    ++count;  }  STACK_PUSH(GENV_ITEMFACTORY->createInteger(result, xs_integer(count)), state);  STACK_END(state);}
开发者ID:cezarfx,项目名称:zorba,代码行数:16,


示例18: remove

/*******************************************************************************  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);}
开发者ID:alyst,项目名称:zorba,代码行数:50,



注:本文中的DEFAULT_STACK_INIT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ DEFINE函数代码示例
C++ DEF函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。