summaryrefslogtreecommitdiff
path: root/ACEXML/common/LocatorImpl.cpp
blob: d7f0d1028bc769b1f120598d051dc710c61e6a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// -*- C++ -*-  $Id$

#include "ACEXML/common/LocatorImpl.h"

#if !defined (__ACEXML_INLINE__)
# include "ACEXML/common/LocatorImpl.i"
#endif /* __ACEXML_INLINE__ */

ACEXML_LocatorImpl::ACEXML_LocatorImpl (void)
  : publicId_ (0),
    systemId_ (0),
    lineNumber_ (1),
    columnNumber_ (0)
{
}

ACEXML_LocatorImpl::ACEXML_LocatorImpl (const ACEXML_Char* systemId,
                                        const ACEXML_Char* publicId)
  : publicId_ (publicId ? ACE::strnew (publicId) : 0),
    systemId_ (systemId ? ACE::strnew (systemId) : 0),
    lineNumber_ (1),
    columnNumber_ (0)
{
}


ACEXML_LocatorImpl::ACEXML_LocatorImpl (const ACEXML_Locator& locator)
  : publicId_ (ACE::strnew (locator.getPublicId ())),
    systemId_ (ACE::strnew (locator.getSystemId ())),
    lineNumber_ (locator.getLineNumber ()),
    columnNumber_ (locator.getColumnNumber ())
{
}

ACEXML_LocatorImpl::~ACEXML_LocatorImpl (void)
{

}

void
ACEXML_LocatorImpl::reset (void)
{
  delete[] this->publicId_;
  delete[] this->systemId_;
  this->columnNumber_ = 0;
  this->lineNumber_ = 1;
}