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

📄 dtdgrammar.hpp

📁 基于属性证书的访问控制源代码,由c++编写,包括openssl,xercesc等
💻 HPP
📖 第 1 页 / 共 2 页
字号:
    virtual void                    setGrammarDescription( XMLGrammarDescription*);    virtual XMLGrammarDescription*  getGrammarDescription() const;    // -----------------------------------------------------------------------    //  Content management methods    // -----------------------------------------------------------------------    unsigned int putEntityDecl(DTDEntityDecl* const entityDecl) const;    // -----------------------------------------------------------------------    //  Notification that lazy data has been deleted    // -----------------------------------------------------------------------    static void reinitDfltEntities();    /***     * Support for Serialization/De-serialization     ***/    DECL_XSERIALIZABLE(DTDGrammar)private:    // -----------------------------------------------------------------------    //  Private helper methods    // -----------------------------------------------------------------------    void resetEntityDeclPool();    // -----------------------------------------------------------------------    // Unimplemented constructors and operators    // -----------------------------------------------------------------------    DTDGrammar(const DTDGrammar &);    DTDGrammar& operator = (const  DTDGrammar&);    // -----------------------------------------------------------------------    //  Private data members    //    //  fElemDeclPool    //      This is the element decl pool. It contains all of the elements    //      declared in the DTD (and their associated attributes.)    //    //  fElemNonDeclPool    //      This is the element decl pool that is is populated as new elements    //      are seen in the XML document (not declared in the DTD), and they    //      are given default characteristics.    //    //  fEntityDeclPool    //      This is a pool of EntityDecl objects, which contains all of the    //      general entities that are declared in the DTD subsets, plus the    //      default entities (such as &gt; &lt; ...) defined by the XML Standard.    //    //  fNotationDeclPool    //      This is a pool of NotationDecl objects, which contains all of the    //      notations declared in the DTD subsets.    //    //  fRootElemId    //      The id of the root element that we found in the DOCTYPE statement.    //      Its initialized to ContentModel::fgInvalidElemId, so that its    //      invalid unless we have a DOCTYPE.    //    //  fValidated    //      Indicates if the content of the Grammar has been pre-validated    //      or not. When using a cached grammar, no need for pre content    //      validation.    //    //  fGramDesc: adopted    //    // -----------------------------------------------------------------------    static NameIdPool<DTDEntityDecl>* fDefaultEntities;    MemoryManager*                    fMemoryManager;    NameIdPool<DTDElementDecl>*       fElemDeclPool;    NameIdPool<DTDElementDecl>*       fElemNonDeclPool;    NameIdPool<DTDEntityDecl>*        fEntityDeclPool;    NameIdPool<XMLNotationDecl>*      fNotationDeclPool;    unsigned int                      fRootElemId;    bool                              fValidated;    XMLDTDDescription*                fGramDesc;};// ---------------------------------------------------------------------------//  DTDGrammar: Getter methods// ---------------------------------------------------------------------------inline unsigned int DTDGrammar::getRootElemId() const{    return fRootElemId;}// ---------------------------------------------------------------------------//  DTDGrammar: Getter methods// ---------------------------------------------------------------------------inline NameIdPoolEnumerator<DTDElementDecl>DTDGrammar::getElemEnumerator() const{    return NameIdPoolEnumerator<DTDElementDecl>(fElemDeclPool, fMemoryManager);}inline NameIdPoolEnumerator<DTDEntityDecl>DTDGrammar::getEntityEnumerator() const{    return NameIdPoolEnumerator<DTDEntityDecl>(fEntityDeclPool, fMemoryManager);}inline NameIdPoolEnumerator<XMLNotationDecl>DTDGrammar::getNotationEnumerator() const{    return NameIdPoolEnumerator<XMLNotationDecl>(fNotationDeclPool, fMemoryManager);}inline const DTDEntityDecl*DTDGrammar::getEntityDecl(const XMLCh* const entName) const{    DTDEntityDecl* decl = fDefaultEntities->getByKey(entName);    if (!decl)        return fEntityDeclPool->getByKey(entName);    return decl;}inline DTDEntityDecl* DTDGrammar::getEntityDecl(const XMLCh* const entName){    DTDEntityDecl* decl = fDefaultEntities->getByKey(entName);    if (!decl)        return fEntityDeclPool->getByKey(entName);    return decl;}inline NameIdPool<DTDEntityDecl>* DTDGrammar::getEntityDeclPool(){    return fEntityDeclPool;}inline const NameIdPool<DTDEntityDecl>* DTDGrammar::getEntityDeclPool() const{    return fEntityDeclPool;}// -----------------------------------------------------------------------//  Setter methods// -----------------------------------------------------------------------inline void DTDGrammar::setRootElemId(unsigned int rootElemId) {    fRootElemId = rootElemId;}inline unsigned int DTDGrammar::putEntityDecl(DTDEntityDecl* const entityDecl)   const{    return fEntityDeclPool->put(entityDecl);}// ---------------------------------------------------------------------------//  DTDGrammar: Virtual methods// ---------------------------------------------------------------------------inline Grammar::GrammarType DTDGrammar::getGrammarType() const {    return Grammar::DTDGrammarType;}inline const XMLCh* DTDGrammar::getTargetNamespace() const {    return XMLUni::fgZeroLenString;}// Element Declinline unsigned int DTDGrammar::getElemId (const   unsigned int                                              , const XMLCh* const                                              , const XMLCh* const    qName                                              , unsigned int) const{    //    //  In this case, we don't return zero to mean 'not found', so we have to    //  map it to the official not found value if we don't find it.    //    const DTDElementDecl* decl = fElemDeclPool->getByKey(qName);    if (!decl)        return XMLElementDecl::fgInvalidElemId;    return decl->getId();}inline const XMLElementDecl* DTDGrammar::getElemDecl( const   unsigned int                                              , const XMLCh* const                                              , const XMLCh* const    qName                                              , unsigned int)   const{    const XMLElementDecl* elemDecl = fElemDeclPool->getByKey(qName);    if (!elemDecl && fElemNonDeclPool)        elemDecl = fElemNonDeclPool->getByKey(qName);    return elemDecl;}inline XMLElementDecl* DTDGrammar::getElemDecl (const   unsigned int                                              , const XMLCh* const                                              , const XMLCh* const    qName                                              , unsigned int){    XMLElementDecl* elemDecl = fElemDeclPool->getByKey(qName);    if (!elemDecl && fElemNonDeclPool)        elemDecl = fElemNonDeclPool->getByKey(qName);    return elemDecl;}inline const XMLElementDecl* DTDGrammar::getElemDecl(const unsigned int elemId) const{    // Look up this element decl by id    return fElemDeclPool->getById(elemId);}inline XMLElementDecl* DTDGrammar::getElemDecl(const unsigned int elemId){    // Look up this element decl by id    return fElemDeclPool->getById(elemId);}inline unsigned intDTDGrammar::putElemDecl(XMLElementDecl* const elemDecl,                        const bool notDeclared) {    if (notDeclared)    {        if(!fElemNonDeclPool)            fElemNonDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(29, 128, fMemoryManager);        return fElemNonDeclPool->put((DTDElementDecl*) elemDecl);    }    return fElemDeclPool->put((DTDElementDecl*) elemDecl);}// Notation Declinline const XMLNotationDecl* DTDGrammar::getNotationDecl(const XMLCh* const notName) const{    return fNotationDeclPool->getByKey(notName);}inline XMLNotationDecl* DTDGrammar::getNotationDecl(const XMLCh* const notName){    return fNotationDeclPool->getByKey(notName);}inline unsigned int DTDGrammar::putNotationDecl(XMLNotationDecl* const notationDecl)   const{    return fNotationDeclPool->put(notationDecl);}inline bool DTDGrammar::getValidated() const{    return fValidated;}inline void DTDGrammar::setValidated(const bool newState){    fValidated = newState;}XERCES_CPP_NAMESPACE_END#endif

⌨️ 快捷键说明

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