1 | // |
2 | // Entity.cpp |
3 | // |
4 | // Library: XML |
5 | // Package: DOM |
6 | // Module: DOM |
7 | // |
8 | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. |
9 | // and Contributors. |
10 | // |
11 | // SPDX-License-Identifier: BSL-1.0 |
12 | // |
13 | |
14 | |
15 | #include "Poco/DOM/Entity.h" |
16 | |
17 | |
18 | namespace Poco { |
19 | namespace XML { |
20 | |
21 | |
22 | const XMLString Entity::NODE_NAME = toXMLString("#entity" ); |
23 | |
24 | |
25 | Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId, const XMLString& notationName): |
26 | AbstractContainerNode(pOwnerDocument), |
27 | _name(name), |
28 | _publicId(publicId), |
29 | _systemId(systemId), |
30 | _notationName(notationName) |
31 | { |
32 | } |
33 | |
34 | |
35 | Entity::Entity(Document* pOwnerDocument, const Entity& entity): |
36 | AbstractContainerNode(pOwnerDocument, entity), |
37 | _name(entity._name), |
38 | _publicId(entity._publicId), |
39 | _systemId(entity._systemId), |
40 | _notationName(entity._notationName) |
41 | { |
42 | } |
43 | |
44 | |
45 | Entity::~Entity() |
46 | { |
47 | } |
48 | |
49 | |
50 | const XMLString& Entity::nodeName() const |
51 | { |
52 | return _name; |
53 | } |
54 | |
55 | |
56 | unsigned short Entity::nodeType() const |
57 | { |
58 | return Node::ENTITY_NODE; |
59 | } |
60 | |
61 | |
62 | Node* Entity::copyNode(bool deep, Document* pOwnerDocument) const |
63 | { |
64 | return new Entity(pOwnerDocument, *this); |
65 | } |
66 | |
67 | |
68 | } } // namespace Poco::XML |
69 | |