1 | // |
---|---|
2 | // LocatorImpl.cpp |
3 | // |
4 | // Library: XML |
5 | // Package: SAX |
6 | // Module: SAX |
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/SAX/LocatorImpl.h" |
16 | |
17 | |
18 | namespace Poco { |
19 | namespace XML { |
20 | |
21 | |
22 | LocatorImpl::LocatorImpl() |
23 | { |
24 | _lineNumber = 0; |
25 | _columnNumber = 0; |
26 | } |
27 | |
28 | |
29 | LocatorImpl::LocatorImpl(const Locator& loc) |
30 | { |
31 | _publicId = loc.getPublicId(); |
32 | _systemId = loc.getSystemId(); |
33 | _lineNumber = loc.getLineNumber(); |
34 | _columnNumber = loc.getColumnNumber(); |
35 | } |
36 | |
37 | |
38 | LocatorImpl::~LocatorImpl() |
39 | { |
40 | } |
41 | |
42 | |
43 | LocatorImpl& LocatorImpl::operator = (const Locator& loc) |
44 | { |
45 | if (&loc != this) |
46 | { |
47 | _publicId = loc.getPublicId(); |
48 | _systemId = loc.getSystemId(); |
49 | _lineNumber = loc.getLineNumber(); |
50 | _columnNumber = loc.getColumnNumber(); |
51 | } |
52 | return *this; |
53 | } |
54 | |
55 | |
56 | XMLString LocatorImpl::getPublicId() const |
57 | { |
58 | return _publicId; |
59 | } |
60 | |
61 | |
62 | XMLString LocatorImpl::getSystemId() const |
63 | { |
64 | return _systemId; |
65 | } |
66 | |
67 | |
68 | int LocatorImpl::getLineNumber() const |
69 | { |
70 | return _lineNumber; |
71 | } |
72 | |
73 | |
74 | int LocatorImpl::getColumnNumber() const |
75 | { |
76 | return _columnNumber; |
77 | } |
78 | |
79 | |
80 | void LocatorImpl::setPublicId(const XMLString& publicId) |
81 | { |
82 | _publicId = publicId; |
83 | } |
84 | |
85 | |
86 | void LocatorImpl::setSystemId(const XMLString& systemId) |
87 | { |
88 | _systemId = systemId; |
89 | } |
90 | |
91 | |
92 | void LocatorImpl::setLineNumber(int lineNumber) |
93 | { |
94 | _lineNumber = lineNumber; |
95 | } |
96 | |
97 | |
98 | void LocatorImpl::setColumnNumber(int columnNumber) |
99 | { |
100 | _columnNumber = columnNumber; |
101 | } |
102 | |
103 | |
104 | } } // namespace Poco::XML |
105 |