crashanalysercmd/PerfToolsSharedLibraries/Engine/SymBuildParsingLib/Utils/SymTextPosition.cs
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 using System; |
|
19 |
|
20 namespace SymBuildParsingLib.Utils |
|
21 { |
|
22 public class SymTextPosition |
|
23 { |
|
24 #region Constructors & destructor |
|
25 public SymTextPosition() |
|
26 { |
|
27 iLine = 1; |
|
28 iColumn = 1; |
|
29 } |
|
30 |
|
31 public SymTextPosition( long aLine, long aColumn ) |
|
32 { |
|
33 iLine = aLine; |
|
34 iColumn = aColumn; |
|
35 } |
|
36 |
|
37 public SymTextPosition( SymTextPosition aCopy ) |
|
38 { |
|
39 iLine = aCopy.Line; |
|
40 iColumn = aCopy.Column; |
|
41 } |
|
42 #endregion |
|
43 |
|
44 #region API |
|
45 public void Inc() |
|
46 { |
|
47 iColumn++; |
|
48 } |
|
49 |
|
50 public void Inc( int aColumnAmount ) |
|
51 { |
|
52 iColumn += aColumnAmount; |
|
53 } |
|
54 |
|
55 public void NewLine() |
|
56 { |
|
57 iLine++; |
|
58 iColumn = 1; |
|
59 } |
|
60 #endregion |
|
61 |
|
62 #region Properties |
|
63 public long Line |
|
64 { |
|
65 get { return iLine; } |
|
66 set { iLine = value; } |
|
67 } |
|
68 |
|
69 public long Column |
|
70 { |
|
71 get { return iColumn; } |
|
72 set { iColumn = value; } |
|
73 } |
|
74 #endregion |
|
75 |
|
76 #region Data members |
|
77 private long iLine; |
|
78 private long iColumn; |
|
79 #endregion |
|
80 } |
|
81 } |