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