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

📄 contentstate.h

📁 SP是一个基于GNU C++编译器
💻 H
字号:
// Copyright (c) 1994, 1996 James Clark// See the file COPYING for copying permission.#ifndef ContentState_INCLUDED#define ContentState_INCLUDED 1#ifdef __GNUG__#pragma interface#endif#include <stddef.h>#include "OpenElement.h"#include "IList.h"#include "Vector.h"#include "Message.h"#include "Dtd.h"#include "Mode.h"#include "Boolean.h"#ifdef SP_NAMESPACEnamespace SP_NAMESPACE {#endifclass SP_API ContentState {public:  ContentState();  void startContent(const Dtd &);  void pushElement(OpenElement *);  OpenElement *popSaveElement();  void popElement();  OpenElement &currentElement();  const OpenElement &currentElement() const;  void getOpenElementInfo(Vector<OpenElementInfo> &,			  const StringC &rniPcdata) const;  unsigned tagLevel() const;  Boolean elementIsIncluded(const ElementType *) const;  Boolean elementIsExcluded(const ElementType *) const;  Boolean elementIsOpen(const ElementType *) const;  Boolean afterDocumentElement() const;  const ElementType *lastEndedElementType() const;  Mode contentMode() const;  ElementType *lookupCreateUndefinedElement(const StringC &,					    const Location &,					    Dtd &);  Boolean checkImplyLoop(unsigned);  static const ShortReferenceMap theEmptyMap;private:  IList<OpenElement> openElements_;  Vector<unsigned> openElementCount_;  Vector<unsigned> includeCount_;  Vector<unsigned> excludeCount_;  unsigned totalExcludeCount_;  unsigned tagLevel_;  unsigned netEnablingCount_;  unsigned long nextIndex_;  const ElementType *lastEndedElementType_;  ElementType documentElementContainer_;};inlineOpenElement &ContentState::currentElement(){  return *openElements_.head();}inlineconst OpenElement &ContentState::currentElement() const{  return *openElements_.head();}inlineBoolean ContentState::elementIsOpen(const ElementType *e) const{  return openElementCount_[e->index()] != 0;}inlineBoolean ContentState::elementIsIncluded(const ElementType *e) const{  return includeCount_[e->index()] != 0 && excludeCount_[e->index()] == 0;}inlineBoolean ContentState::elementIsExcluded(const ElementType *e) const{  return excludeCount_[e->index()] != 0;}inlineconst ElementType *ContentState::lastEndedElementType() const{  return lastEndedElementType_;}inlineunsigned ContentState::tagLevel() const{  return tagLevel_;}inlineBoolean ContentState::afterDocumentElement() const{  return tagLevel() == 0 && currentElement().isFinished();}inlineMode ContentState::contentMode() const{  return openElements_.head()->mode(netEnablingCount_ > 0);}#ifdef SP_NAMESPACE}#endif#endif /* not ContentState_INCLUDED */

⌨️ 快捷键说明

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