corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | #region BSD License |
2 | /* |
||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) |
||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted |
||
6 | provided that the following conditions are met: |
||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions |
||
9 | and the following disclaimer. |
||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions |
||
11 | and the following disclaimer in the documentation and/or other materials provided with the |
||
12 | distribution. |
||
13 | * The name of the author may not be used to endorse or promote products derived from this software |
||
14 | without specific prior written permission. |
||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
23 | */ |
||
24 | #endregion |
||
25 | |||
26 | #region CVS Information |
||
27 | /* |
||
28 | * $Source$ |
||
29 | * $Author: jendave $ |
||
30 | * $Date: 2006-01-27 16:49:58 -0800 (Fri, 27 Jan 2006) $ |
||
31 | * $Revision: 71 $ |
||
32 | */ |
||
33 | #endregion |
||
34 | |||
35 | using System; |
||
36 | |||
37 | namespace Prebuild.Core.Parse |
||
38 | { |
||
39 | /// <summary> |
||
40 | /// |
||
41 | /// </summary> |
||
42 | public enum IfState |
||
43 | { |
||
44 | /// <summary> |
||
45 | /// |
||
46 | /// </summary> |
||
47 | None, |
||
48 | /// <summary> |
||
49 | /// |
||
50 | /// </summary> |
||
51 | If, |
||
52 | /// <summary> |
||
53 | /// |
||
54 | /// </summary> |
||
55 | ElseIf, |
||
56 | /// <summary> |
||
57 | /// |
||
58 | /// </summary> |
||
59 | Else |
||
60 | } |
||
61 | |||
62 | /// <summary> |
||
63 | /// Summary description for IfContext. |
||
64 | /// </summary> |
||
65 | // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/) |
||
66 | public class IfContext |
||
67 | { |
||
68 | #region Properties |
||
69 | |||
70 | bool m_Active; |
||
71 | bool m_Keep; |
||
72 | bool m_EverKept; |
||
73 | IfState m_State = IfState.None; |
||
74 | |||
75 | #endregion |
||
76 | |||
77 | #region Constructors |
||
78 | |||
79 | /// <summary> |
||
80 | /// Initializes a new instance of the <see cref="IfContext"/> class. |
||
81 | /// </summary> |
||
82 | /// <param name="active">if set to <c>true</c> [active].</param> |
||
83 | /// <param name="keep">if set to <c>true</c> [keep].</param> |
||
84 | /// <param name="state">The state.</param> |
||
85 | public IfContext(bool active, bool keep, IfState state) |
||
86 | { |
||
87 | m_Active = active; |
||
88 | m_Keep = keep; |
||
89 | m_EverKept = keep; |
||
90 | m_State = state; |
||
91 | } |
||
92 | |||
93 | #endregion |
||
94 | |||
95 | #region Properties |
||
96 | |||
97 | /// <summary> |
||
98 | /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active. |
||
99 | /// </summary> |
||
100 | /// <value><c>true</c> if active; otherwise, <c>false</c>.</value> |
||
101 | public bool Active |
||
102 | { |
||
103 | get |
||
104 | { |
||
105 | return m_Active; |
||
106 | } |
||
107 | set |
||
108 | { |
||
109 | m_Active = value; |
||
110 | } |
||
111 | } |
||
112 | |||
113 | /// <summary> |
||
114 | /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep. |
||
115 | /// </summary> |
||
116 | /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value> |
||
117 | public bool Keep |
||
118 | { |
||
119 | get |
||
120 | { |
||
121 | return m_Keep; |
||
122 | } |
||
123 | set |
||
124 | { |
||
125 | m_Keep = value; |
||
126 | if(m_Keep) |
||
127 | { |
||
128 | m_EverKept = true; |
||
129 | } |
||
130 | } |
||
131 | } |
||
132 | |||
133 | /// <summary> |
||
134 | /// Gets a value indicating whether [ever kept]. |
||
135 | /// </summary> |
||
136 | /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value> |
||
137 | public bool EverKept |
||
138 | { |
||
139 | get |
||
140 | { |
||
141 | return m_EverKept; |
||
142 | } |
||
143 | } |
||
144 | |||
145 | /// <summary> |
||
146 | /// Gets or sets the state. |
||
147 | /// </summary> |
||
148 | /// <value>The state.</value> |
||
149 | public IfState State |
||
150 | { |
||
151 | get |
||
152 | { |
||
153 | return m_State; |
||
154 | } |
||
155 | set |
||
156 | { |
||
157 | m_State = value; |
||
158 | } |
||
159 | } |
||
160 | |||
161 | #endregion |
||
162 | } |
||
163 | } |