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

📄 xmlelementdecl.hpp

📁 经典开源游戏glest的源代码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
    const QName* getElementName() const;    QName* getElementName();    /** Get the full name of this element type.      *      * Return the full name of the element. If namespaces      * are not enabled, then this is the qName. Else it is the {uri}baseName      * form. For those validators that always require namespace processing, it      * will always be in the latter form because namespace processing will always      * be on.      */    const XMLCh* getFullName() const;    /** Get the create reason for this element type      *      * This method returns an enumeration which indicates why this element      * declaration exists. Elements can be used before they are actually      * declared, so they will often be faulted into the pool and marked as      * to why they are there.      *      * @return An enumerated value that indicates the reason why this element      * was added to the element decl pool.      */    CreateReasons getCreateReason() const;    /** Get the element decl pool id for this element type      *      * This method will return the element decl pool id of this element      * declaration. This uniquely identifies this element type within the      * parse event that it is declared within. This value is assigned by the      * grammar whose decl pool this object belongs to.      *      * @return The element decl id of this element declaration.      */    unsigned int getId() const;    /**     * @return the uri part of DOM Level 3 TypeInfo     * @deprecated     */    virtual const XMLCh* getDOMTypeInfoUri() const = 0;    /**     * @return the name part of DOM Level 3 TypeInfo     * @deprecated     */    virtual const XMLCh* getDOMTypeInfoName() const = 0;    /** Indicate whether this element type has been declared yet      *      * This method returns a boolean that indicates whether this element      * has been declared yet. There are a number of reasons why an element      * declaration can be faulted in, but eventually it must be declared or      * its an error. See the CreateReasons enumeration.      *      * @return true if this element has been declared, else false.      */    bool isDeclared() const;    /** Indicate whether this element type has been declared externally      *      * This method returns a boolean that indicates whether this element      * has been declared externally.      *      * @return true if this element has been declared externally, else false.      */    bool isExternal() const;    /** Get the memory manager      *      * This method returns the configurable memory manager used by the      * element declaration for dynamic allocation/deacllocation.      *      * @return the memory manager      */    MemoryManager* getMemoryManager() const;    //@}    // -----------------------------------------------------------------------    //  Setter methods    // -----------------------------------------------------------------------    /** @name Setter methods */    //@{    /** Set the element name object for this element type      *      * This method will adopt the based content spec node object. This is called      * by the actual validator which is parsing its DTD or Schema or whatever      * and store it on the element decl object via this method.      *      * @param  prefix       Prefix of the element      * @param  localPart    Base Name of the element      * @param  uriId        The uriId of the element      */      void setElementName(const XMLCh* const       prefix                        , const XMLCh* const       localPart                        , const int                uriId );    /** Set the element name object for this element type      *      * This method will adopt the based content spec node object. This is called      * by the actual validator which is parsing its DTD or Schema or whatever      * and store it on the element decl object via this method.      *      * @param  rawName      Full Name of the element      * @param  uriId        The uriId of the element      */      void setElementName(const XMLCh* const    rawName                        , const int             uriId );    /** Set the element name object for this element type      *      * This method will adopt the based content spec node object. This is called      * by the actual validator which is parsing its DTD or Schema or whatever      * and store it on the element decl object via this method.      *      * @param  elementName  QName of the element      */      void setElementName(const QName* const    elementName);    /** Update the create reason for this element type.      *      * This method will update the 'create reason' field for this element      * decl object. As the validator parses its DTD, Schema, etc... it will      * encounter various references to an element declaration, which will      * cause the element declaration to either be declared or to be faulted      * into the pool in preperation for some future declaration. As it does      * so,it will update this field to indicate the current satus of the      * decl object.      */    void setCreateReason(const CreateReasons newReason);    /** Set the element decl pool id for this element type      *      * This method will set the pool id of this element decl. This is called      * by the grammar which created this object, and will provide this      * decl object with a unique id within the parse event that created it.      */    void setId(const unsigned int newId);    /** Set the element decl to indicate external declaration      *      */    void setExternalElemDeclaration(const bool aValue);    //@}    // -----------------------------------------------------------------------    //  Miscellaneous methods    // -----------------------------------------------------------------------    /** @name Miscellenous methods */    //@{    //@}    /***     * Support for Serialization/De-serialization     ***/    DECL_XSERIALIZABLE(XMLElementDecl)    enum objectType    {        Schema      , DTD      , UnKnown    };    virtual XMLElementDecl::objectType  getObjectType() const = 0;    static void            storeElementDecl(XSerializeEngine&        serEng                                          , XMLElementDecl*    const element);    static XMLElementDecl* loadElementDecl(XSerializeEngine& serEng);protected :    // -----------------------------------------------------------------------    //  Hidden constructors    // -----------------------------------------------------------------------    XMLElementDecl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);private :    // -----------------------------------------------------------------------    //  Unimplemented constructors and operators    // -----------------------------------------------------------------------    XMLElementDecl(const XMLElementDecl&);    XMLElementDecl& operator=(const XMLElementDecl&);    // -----------------------------------------------------------------------    //  Data members    //    //  fElementName    //      This is the name of the element decl.    //    //  fCreateReason    //      We sometimes have to put an element decl object into the elem    //      decl pool before the element's declaration is seen, such as when    //      its used in another element's content model or an att list is    //      seen for it. This flag tells us whether its been declared, and    //      if not why it had to be created.    //    //  fId    //      The unique id of this element. This is created by the derived    //      class, or more accurately the grammar that owns the objects    //      of the derived types. But, since they all have to have them, we    //      let them all store the id here. It is defaulted to have the    //      value fgInvalidElem until explicitly set.    //    //  fExternalElement    //      This flag indicates whether or the element was declared externally.    // -----------------------------------------------------------------------    MemoryManager*      fMemoryManager;    QName*              fElementName;    CreateReasons       fCreateReason;    unsigned int        fId;    bool                fExternalElement;};// ---------------------------------------------------------------------------//  XMLElementDecl: Getter methods// ---------------------------------------------------------------------------inline const XMLCh* XMLElementDecl::getBaseName() const{    return fElementName->getLocalPart();}inline XMLCh* XMLElementDecl::getBaseName(){    return fElementName->getLocalPart();}inline unsigned int XMLElementDecl::getURI() const{    return fElementName->getURI();}inline const QName* XMLElementDecl::getElementName() const{    return fElementName;}inline QName* XMLElementDecl::getElementName(){    return fElementName;}inline const XMLCh* XMLElementDecl::getFullName() const{    return fElementName->getRawName();}inline XMLElementDecl::CreateReasons XMLElementDecl::getCreateReason() const{    return fCreateReason;}inline unsigned int XMLElementDecl::getId() const{    return fId;}inline bool XMLElementDecl::isDeclared() const{    return (fCreateReason == Declared);}inline bool XMLElementDecl::isExternal() const{    return fExternalElement;}inline MemoryManager* XMLElementDecl::getMemoryManager() const{    return fMemoryManager;}// ---------------------------------------------------------------------------//  XMLElementDecl: Setter methods// ---------------------------------------------------------------------------inline voidXMLElementDecl::setCreateReason(const XMLElementDecl::CreateReasons newReason){    fCreateReason = newReason;}inline void XMLElementDecl::setId(const unsigned int newId){    fId = newId;}inline void XMLElementDecl::setExternalElemDeclaration(const bool aValue){    fExternalElement = aValue;}XERCES_CPP_NAMESPACE_END#endif

⌨️ 快捷键说明

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