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

📄 entity.h

📁 This software aims to create an applet and panel tools to manage a wireless interface card, such as
💻 H
字号:
//
// Entity.h
//
// $Id: //poco/Main/XML/include/DOM/Entity.h#5 $
//
// Definition of the DOM Entity class.
//
// Copyright (c) 2004, Guenter Obiltschnig/Applied Informatics.
// All rights reserved.
// 
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
// 
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
// 
// 3. Redistributions in any form must be accompanied by information on
//    how to obtain complete source code for this software and any
//    accompanying software that uses this software.  The source code
//    must either be included in the distribution or be available for no
//    more than the cost of distribution plus a nominal fee, and must be
//    freely redistributable under reasonable conditions.  For an
//    executable file, complete source code means the source code for all
//    modules it contains.  It does not include source code for modules or
//    files that typically accompany the major components of the operating
//    system on which the executable file runs.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//


#ifndef DOM_Entity_INCLUDED
#define DOM_Entity_INCLUDED


#ifndef XML_XML_INCLUDED
#include "XML/XML.h"
#endif
#ifndef DOM_AbstractContainerNode_INCLUDED
#include "DOM/AbstractContainerNode.h"
#endif
#ifndef XML_XMLString_INCLUDED
#include "XML/XMLString.h"
#endif


XML_BEGIN


class XML_API Entity: public AbstractContainerNode
	/// This interface represents an entity, either parsed or unparsed, in an XML
	/// document. Note that this models the entity itself not the entity declaration.
	/// Entity declaration modeling has been left for a later Level of the DOM
	/// specification.
	/// 
	/// The nodeName attribute that is inherited from Node contains the name of
	/// the entity.
	/// 
	/// An XML processor may choose to completely expand entities before the structure
	/// model is passed to the DOM; in this case there will be no EntityReference
	/// nodes in the document tree.
	/// 
	/// XML does not mandate that a non-validating XML processor read and process
	/// entity declarations made in the external subset or declared in external
	/// parameter entities. This means that parsed entities declared in the external
	/// subset need not be expanded by some classes of applications, and that the
	/// replacement value of the entity may not be available. When the replacement
	/// value is available, the corresponding Entity node's child list represents
	/// the structure of that replacement text. Otherwise, the child list is empty.
	/// 
	/// The resolution of the children of the Entity (the replacement value) may
	/// be lazily evaluated; actions by the user (such as calling the childNodes
	/// method on the Entity Node) are assumed to trigger the evaluation.
	/// 
	/// The DOM Level 1 does not support editing Entity nodes; if a user wants to
	/// make changes to the contents of an Entity, every related EntityReference
	/// node has to be replaced in the structure model by a clone of the Entity's
	/// contents, and then the desired changes must be made to each of those clones
	/// instead. Entity nodes and all their descendants are readonly.
	/// 
	/// An Entity node does not have any parent.
{
public:
	const XMLString& publicId() const;
		/// Returns the public identifier associated with
		/// the entity, if specified. If the public identifier
		/// was not specified, this is the empty string.

	const XMLString& systemId() const;
		/// Returns the system identifier associated with
		/// the entity, if specified. If the system identifier
		/// was not specified, this is the empty string.

	const XMLString& notationName() const;
		/// Returns, for unparsed entities, the name of the
		/// notation for the entity. For parsed entities, this
		/// is the empty string.

	// Node
	const XMLString& nodeName() const;
	unsigned short nodeType() const;

protected:
	Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId, const XMLString& notationName);
	Entity(Document* pOwnerDocument, const Entity& entity);
	~Entity();
	
	Node* copyNode(bool deep, Document* pOwnerDocument) const;

private:
	static const XMLString NODE_NAME;

	XMLString _name;
	XMLString _publicId;
	XMLString _systemId;
	XMLString _notationName;

	friend class Document;
};


//
// inlines
//
inline const XMLString& Entity::publicId() const
{
	return _publicId;
}


inline const XMLString& Entity::systemId() const
{
	return _systemId;
}


inline const XMLString& Entity::notationName() const
{
	return _notationName;
}


XML_END


#endif // DOM_Entity_INCLUDED

⌨️ 快捷键说明

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