Main Page
Namespaces
Classes
Files
Examples
File List
File Members
include
xqilla
ast
LocationInfo.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2001, 2008,
3
* DecisionSoft Limited. All rights reserved.
4
* Copyright (c) 2004, 2011,
5
* Oracle and/or its affiliates. All rights reserved.
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
#ifndef _LOCATIONINFO_HPP
21
#define _LOCATIONINFO_HPP
22
23
24
#include <xqilla/framework/XQillaExport.hpp>
25
26
#include <xercesc/util/XercesDefs.hpp>
27
29
class
XQILLA_API
LocationInfo
30
{
31
public
:
33
LocationInfo
()
34
: file_(0), line_(0), column_(0) {}
36
LocationInfo
(
const
XMLCh *file,
unsigned
int
line,
unsigned
int
column)
37
: file_(file), line_(line), column_(column) {}
38
40
const
XMLCh *
getFile
()
const
{
return
file_; }
42
unsigned
int
getLine
()
const
{
return
line_; }
44
unsigned
int
getColumn
()
const
{
return
column_; }
45
47
void
setLocationInfo
(
const
XMLCh *file,
unsigned
int
line,
unsigned
int
column)
48
{
49
file_ = file;
50
line_ = line;
51
column_ = column;
52
}
54
void
setLocationInfo
(
const
LocationInfo
*o)
55
{
56
if
(o != 0) {
57
file_ = o->file_;
58
line_ = o->line_;
59
column_ = o->column_;
60
}
61
}
62
63
private
:
64
const
XMLCh *file_;
65
unsigned
int
line_, column_;
66
};
67
68
#endif
Generated by
1.8.4