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

📄 xmlentitydecl.hpp

📁 经典开源游戏glest的源代码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
    );    /**     *  This method will set the notation name for this entity. By setting     *  this, you are indicating that this is an unparsed external entity.     *     *  @param  newName   The new notation name to give to this entity.     */    void setNotationName(const XMLCh* const newName);    /**     *  This method will set a new public id on this entity. The public id     *  has no particular form and is purely for client consumption.     *     *  @param  newId     The new public id to give to this entity.     */    void setPublicId(const XMLCh* const newId);    /**     *  This method will set a new sysetm id on this entity. This will     *  then control where the source for this entity lives. If it is     *  an internal entity, then the system id is only for bookkeeping     *  purposes, and to allow any external entities referenced from     *  within the entity to be correctly resolved.     *     *  @param  newId     The new system id to give to the entity.     */    void setSystemId(const XMLCh* const newId);    /**     *  This method will set a new baseURI on this entity. This will     *  then control the URI used to resolve the relative system Id.     *     *  @param  newId     The new base URI to give to the entity.     */    void setBaseURI(const XMLCh* const newId);    /**     *  This method will set a new value for this entity. This is only     *  valid if the entity is to be an internal entity. By setting this     *  field, you are indicating that the entity is internal.     *     *  @param  newValue  The new value to give to this entity.     */    void setValue(const XMLCh* const newValue);    //@}    /* For internal use only */    void setId(const unsigned int newId);    // -----------------------------------------------------------------------    //  Support named pool syntax    // -----------------------------------------------------------------------    /** @name Setter methods */    //@{    /**      * This method allows objects of this class to be used within a standard      * keyed collection used commonly within the parser system. The collection      * calls this method to get the key (usually to hash it) by which the      * object is to be stored.      */    const XMLCh* getKey() const;    //@}    /***     * Support for Serialization/De-serialization     ***/    DECL_XSERIALIZABLE(XMLEntityDecl)private :    // -----------------------------------------------------------------------    //  Unimplemented constructors and operators    // -----------------------------------------------------------------------    XMLEntityDecl(const XMLEntityDecl&);    XMLEntityDecl& operator=(XMLEntityDecl&);    // -----------------------------------------------------------------------    //  XMLEntityDecl: Private helper methods    // -----------------------------------------------------------------------    void cleanUp();    // -----------------------------------------------------------------------    //  Private data members    //    //  fId    //      This is the unique id given to this entity decl.    //    //  fName    //      The name of the enitity. Entity names are never namespace based.    //    //  fNotationName    //      The optional notation of the entity. If there was none, then its    //      empty.    //    //  fPublicId    //      The public id of the entity, which can be empty.    //    //  fSystemId    //      The system id of the entity.    //    //  fValue    //  fValueLen    //      The entity's value and length, which is only valid if its an    //      internal style entity.    //    //  fBaseURI    //      The base URI of the entity.   According to XML InfoSet, such value    //      is the URI where it is declared (NOT referenced).    // -----------------------------------------------------------------------    unsigned int    fId;    unsigned int    fValueLen;    XMLCh*          fValue;    XMLCh*          fName;    XMLCh*          fNotationName;    XMLCh*          fPublicId;    XMLCh*          fSystemId;    XMLCh*          fBaseURI;    MemoryManager*  fMemoryManager;};// ---------------------------------------------------------------------------//  XMLEntityDecl: Getter methods// ---------------------------------------------------------------------------inline unsigned int XMLEntityDecl::getId() const{    return fId;}inline const XMLCh* XMLEntityDecl::getName() const{    return fName;}inline const XMLCh* XMLEntityDecl::getNotationName() const{    return fNotationName;}inline const XMLCh* XMLEntityDecl::getPublicId() const{    return fPublicId;}inline const XMLCh* XMLEntityDecl::getSystemId() const{    return fSystemId;}inline const XMLCh* XMLEntityDecl::getBaseURI() const{    return fBaseURI;}inline const XMLCh* XMLEntityDecl::getValue() const{    return fValue;}inline unsigned int XMLEntityDecl::getValueLen() const{    return fValueLen;}inline bool XMLEntityDecl::isExternal() const{    // If it has a system or public id, its external    return ((fPublicId != 0) || (fSystemId != 0));}inline bool XMLEntityDecl::isUnparsed() const{    // If it has a notation, its unparsed    return (fNotationName != 0);}inline MemoryManager* XMLEntityDecl::getMemoryManager() const{    return fMemoryManager;}// ---------------------------------------------------------------------------//  XMLEntityDecl: Setter methods// ---------------------------------------------------------------------------inline void XMLEntityDecl::setId(const unsigned int newId){    fId = newId;}inline void XMLEntityDecl::setNotationName(const XMLCh* const newName){    if (fNotationName)        fMemoryManager->deallocate(fNotationName);    fNotationName = XMLString::replicate(newName, fMemoryManager);}inline void XMLEntityDecl::setPublicId(const XMLCh* const newId){    if (fPublicId)        fMemoryManager->deallocate(fPublicId);    fPublicId = XMLString::replicate(newId, fMemoryManager);}inline void XMLEntityDecl::setSystemId(const XMLCh* const newId){    if (fSystemId)        fMemoryManager->deallocate(fSystemId);    fSystemId = XMLString::replicate(newId, fMemoryManager);}inline void XMLEntityDecl::setBaseURI(const XMLCh* const newId){    if (fBaseURI)        fMemoryManager->deallocate(fBaseURI);    fBaseURI = XMLString::replicate(newId, fMemoryManager);}inline void XMLEntityDecl::setValue(const XMLCh* const newValue){    if (fValue)        fMemoryManager->deallocate(fValue);    fValue = XMLString::replicate(newValue, fMemoryManager);    fValueLen = XMLString::stringLen(newValue);}// ---------------------------------------------------------------------------//  XMLEntityDecl: Support named pool syntax// ---------------------------------------------------------------------------inline const XMLCh* XMLEntityDecl::getKey() const{    return fName;}XERCES_CPP_NAMESPACE_END#endif

⌨️ 快捷键说明

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