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
18namespace Poco {
19namespace XML {
20
21
22LocatorImpl::LocatorImpl()
23{
24 _lineNumber = 0;
25 _columnNumber = 0;
26}
27
28
29LocatorImpl::LocatorImpl(const Locator& loc)
30{
31 _publicId = loc.getPublicId();
32 _systemId = loc.getSystemId();
33 _lineNumber = loc.getLineNumber();
34 _columnNumber = loc.getColumnNumber();
35}
36
37
38LocatorImpl::~LocatorImpl()
39{
40}
41
42
43LocatorImpl& 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
56XMLString LocatorImpl::getPublicId() const
57{
58 return _publicId;
59}
60
61
62XMLString LocatorImpl::getSystemId() const
63{
64 return _systemId;
65}
66
67
68int LocatorImpl::getLineNumber() const
69{
70 return _lineNumber;
71}
72
73
74int LocatorImpl::getColumnNumber() const
75{
76 return _columnNumber;
77}
78
79
80void LocatorImpl::setPublicId(const XMLString& publicId)
81{
82 _publicId = publicId;
83}
84
85
86void LocatorImpl::setSystemId(const XMLString& systemId)
87{
88 _systemId = systemId;
89}
90
91
92void LocatorImpl::setLineNumber(int lineNumber)
93{
94 _lineNumber = lineNumber;
95}
96
97
98void LocatorImpl::setColumnNumber(int columnNumber)
99{
100 _columnNumber = columnNumber;
101}
102
103
104} } // namespace Poco::XML
105