⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contenttoken.h

📁 SP是一个基于GNU C++编译器
💻 H
📖 第 1 页 / 共 2 页
字号:
  unsigned andStateSize() const;  Boolean containsPcdata() const;  const ModelGroup *modelGroup() const;private:  CompiledModelGroup(const CompiledModelGroup &); // undefined  void operator=(const CompiledModelGroup &);	  // undefined  Owner<ModelGroup> modelGroup_;  Owner<LeafContentToken> initial_;  unsigned andStateSize_;  Boolean containsPcdata_;};class SP_API AndState {public:  AndState(unsigned);  Boolean isClear(unsigned) const;  void clearFrom(unsigned);  void set(unsigned);  Boolean operator==(const AndState &) const;  Boolean operator!=(const AndState &) const;private:  void clearFrom1(unsigned);  unsigned clearFrom_;  Vector<PackedBoolean> v_;};class SP_API MatchState {public:  MatchState();  MatchState(const CompiledModelGroup *); // may be 0  Boolean tryTransition(const ElementType *);  Boolean tryTransitionPcdata();  void possibleTransitions(Vector<const ElementType *> &) const;  Boolean isFinished() const;  const LeafContentToken *impliedStartTag() const;  const LeafContentToken *invalidExclusion(const ElementType *) const;  void doRequiredTransition();  const LeafContentToken *currentPosition() const;  Boolean operator==(const MatchState &) const;  Boolean operator!=(const MatchState &) const;private:  const LeafContentToken *pos_;  AndState andState_;  unsigned minAndDepth_;};inlineContentToken::OccurrenceIndicator ContentToken::occurrenceIndicator() const{  return occurrenceIndicator_;}inlineunsigned LeafContentToken::index() const{  return leafIndex_;}inlineunsigned LeafContentToken::typeIndex() const{  return typeIndex_;}inlineBoolean ContentToken::inherentlyOptional() const{  return inherentlyOptional_;}inlineconst ElementType *LeafContentToken::elementType() const{  return element_;}inlineunsigned AndModelGroup::andDepth() const{  return andDepth_;}inlineunsigned AndModelGroup::andIndex() const{  return andIndex_;}inlineunsigned ModelGroup::nMembers() const{  return members_.size();}inlineunsigned ContentToken::andDepth(const AndModelGroup *andAncestor){  return andAncestor ? andAncestor->andDepth() + 1 : 0;}inlineunsigned ContentToken::andIndex(const AndModelGroup *andAncestor){  return (andAncestor	  ? andAncestor->andIndex() + andAncestor->nMembers()	  : 0);}inlineContentToken &ModelGroup::member(unsigned i){  return *members_[i];}inlineconst ContentToken &ModelGroup::member(unsigned i) const{  return *members_[i];}inlinevoid LeafContentToken::setFinal(){  isFinal_ = 1;}inlineBoolean LeafContentToken::isFinal() const{  return isFinal_;}inlineBoolean LeafContentToken::orGroupMember() const{  return orGroupMember_;}inlineunsigned CompiledModelGroup::andStateSize() const{  return andStateSize_;}inlineBoolean CompiledModelGroup::containsPcdata() const{  return containsPcdata_;}inlineconst AndModelGroup *AndModelGroup::andAncestor() const{  return andAncestor_;}inlineunsigned AndModelGroup::andGroupIndex() const{  return andGroupIndex_;}inlineconst LeafContentToken *CompiledModelGroup::initial() const{  return initial_.pointer();}inlineconst ModelGroup *CompiledModelGroup::modelGroup() const{  return modelGroup_.pointer();}inlineconst AndModelGroup *LeafContentToken::andAncestor() const{  return andInfo_ ? andInfo_->andAncestor : 0;}inlineunsigned LeafContentToken::andDepth() const{  return andInfo_ ? ContentToken::andDepth(andInfo_->andAncestor) : 0;}inlineunsigned LeafContentToken::computeMinAndDepth(const AndState &andState) const{  return andInfo_ ? computeMinAndDepth1(andState) : 0;}inlineBoolean LeafContentToken::tryTransitionPcdata(AndState &andState,					      unsigned &minAndDepth,					      const LeafContentToken *&newpos)     const{  if (pcdataTransitionType_ == 1) {    newpos = simplePcdataTransition_;    return 1;  }  else if (pcdataTransitionType_ == 0)    return 0;  else    return tryTransition(0, andState, minAndDepth, newpos);}inlineBoolean MatchState::tryTransition(const ElementType *to){  return pos_->tryTransition(to, andState_, minAndDepth_, pos_);}inlineBoolean MatchState::tryTransitionPcdata(){  return pos_->tryTransitionPcdata(andState_, minAndDepth_, pos_);}inlinevoid MatchState::possibleTransitions(Vector<const ElementType *> &v) const{  pos_->possibleTransitions(andState_, minAndDepth_, v);}inlineBoolean MatchState::isFinished() const{  return pos_->isFinal() && minAndDepth_ == 0;}inlineconst LeafContentToken *MatchState::impliedStartTag() const{  return pos_->impliedStartTag(andState_, minAndDepth_);}inlinevoid MatchState::doRequiredTransition(){  pos_->doRequiredTransition(andState_, minAndDepth_, pos_);}inlineconst LeafContentToken *MatchState::currentPosition() const{  return pos_;}inlineBoolean MatchState::operator!=(const MatchState &state) const{  return !(*this == state);}inlineBoolean AndState::isClear(unsigned i) const{  return v_[i] == 0;}inlinevoid AndState::set(unsigned i){  v_[i] = 1;  if (i >= clearFrom_)    clearFrom_ = i + 1;}inlinevoid AndState::clearFrom(unsigned i){  if (i < clearFrom_)    clearFrom1(i);}inlineBoolean AndState::operator!=(const AndState &state) const{  return !(*this == state);}inlinesize_t FirstSet::size() const{  return v_.size();}inlineLeafContentToken *FirstSet::token(size_t i) const{  return v_[i];}inlinesize_t FirstSet::requiredIndex() const{  return requiredIndex_;}inlinevoid FirstSet::setNotRequired(){  requiredIndex_ = size_t(-1);}#ifdef SP_NAMESPACE}#endif#endif /* not ContentToken_INCLUDED */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -