summaryrefslogtreecommitdiff
path: root/ACEXML/parser/parser/ParserContext.inl
blob: b8f30ea248db8033f921f4934ca56baa8b0a00b3 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// -*- C++ -*-
//
// $Id$

#include <algorithm>

ACEXML_INLINE
ACEXML_Parser_Context::ACEXML_Parser_Context()
  : instream_ (0),
    locator_ (0)
{

}

ACEXML_INLINE
ACEXML_Parser_Context::ACEXML_Parser_Context (ACEXML_InputSource* instream,
                                              ACEXML_LocatorImpl* locator)
  : instream_ (instream),
    locator_ (locator)
{

}

ACEXML_INLINE
ACEXML_Parser_Context::ACEXML_Parser_Context (const ACEXML_Parser_Context& src)
  : instream_ (src.instream_),
    locator_ (src.locator_)
{

}

ACEXML_INLINE bool
ACEXML_Parser_Context::operator!= (const ACEXML_Parser_Context& src)
{
  return (this->instream_ != src.instream_ && this->locator_ != src.locator_);
}

ACEXML_INLINE ACEXML_Parser_Context&
ACEXML_Parser_Context::operator= (const ACEXML_Parser_Context& src)
{
  ACEXML_Parser_Context tmp (src);
  std::swap (this->instream_, tmp.instream_);
  std::swap (this->locator_, tmp.locator_);
  return *this;
}


ACEXML_INLINE ACEXML_InputSource*
ACEXML_Parser_Context::getInputSource (void)
{
  return this->instream_;
}

ACEXML_INLINE ACEXML_LocatorImpl*
ACEXML_Parser_Context::getLocator (void)
{
  return this->locator_;
}

ACEXML_INLINE void
ACEXML_Parser_Context::setInputSource (ACEXML_InputSource* ip)
{
  this->instream_ = ip;
}

ACEXML_INLINE void
ACEXML_Parser_Context::setLocator (ACEXML_LocatorImpl* locator)
{
  this->locator_ = locator;
}

ACEXML_INLINE void
ACEXML_Parser_Context::reset (void)
{
  this->instream_ = 0;
  this->locator_ = 0;
}