Definition at line 22 of file Operand.cs.
◆ AllocateFunctionPointer()
| Operand ScriptStack.Runtime.Operand.AllocateFunctionPointer |
( |
Function | function | ) |
|
|
static |
Definition at line 79 of file Operand.cs.
80 {
81 return new Operand(
OperandType.FunctionPointer,
function,
null);
82 }
◆ AllocateInstructionPointer()
| Operand ScriptStack.Runtime.Operand.AllocateInstructionPointer |
( |
Instruction | instruction | ) |
|
|
static |
Definition at line 74 of file Operand.cs.
75 {
76 return new Operand(
OperandType.InstructionPointer, instruction,
null);
77 }
◆ AllocateRoutinePointer()
| Operand ScriptStack.Runtime.Operand.AllocateRoutinePointer |
( |
Routine | routine | ) |
|
|
static |
Definition at line 84 of file Operand.cs.
85 {
86 return new Operand(
OperandType.RoutinePointer, routine,
null);
87 }
◆ CreatePointer()
| Operand ScriptStack.Runtime.Operand.CreatePointer |
( |
string | identifier, |
|
|
string | pointer ) |
|
static |
Definition at line 69 of file Operand.cs.
70 {
71 return new Operand(
OperandType.Pointer, identifier, pointer);
72 }
◆ Literal()
| Operand ScriptStack.Runtime.Operand.Literal |
( |
object | val | ) |
|
|
static |
◆ MemberVariable()
| Operand ScriptStack.Runtime.Operand.MemberVariable |
( |
string | identifier, |
|
|
object | val ) |
|
static |
◆ ToString()
| override string ScriptStack.Runtime.Operand.ToString |
( |
| ) |
|
Definition at line 146 of file Operand.cs.
147 {
148
149 switch (m_operandType)
150 {
151
153 {
154
155
156 if (m_objectValue.GetType().ToString() == "System.String")
157 return ToLiteral((string)m_objectValue);
158
159 else if (m_objectValue.GetType().ToString() == "System.Char")
160 return ToLiteral("" + (char)m_objectValue);
161
162 else
163 return ToString(m_objectValue);
164
165 }
166
168 return m_objectValue.ToString();
169
171 return m_objectValue + "[" + ToString(m_objectIndex) + "]";
172
174 return m_objectValue + "[" + m_objectIndex + "]";
175
177 return "[" + ((Instruction) m_objectValue).Address.ToString("X8") + "]";
178
180 {
182 return "<" + scriptFunction.Name +
"@" + scriptFunction.
EntryPoint.
Address.ToString(
"X8") +
">";
183 }
184
186 return m_objectValue.ToString();
187
188 default:
189 return ToLiteral(m_operandType.ToString());
190
191 }
192 }
References ScriptStack.Runtime.Instruction.Address, ScriptStack.Runtime.Function.EntryPoint, and ToString().
Referenced by ToString().
◆ Variable()
| Operand ScriptStack.Runtime.Operand.Variable |
( |
string | identifier | ) |
|
|
static |
◆ FunctionPointer
| Function ScriptStack.Runtime.Operand.FunctionPointer |
|
getset |
Definition at line 259 of file Operand.cs.
260 {
261 get
262 {
264 throw new ParserException("Error in function call.");
265
267 }
268 set
269 {
271 throw new ParserException("Error in function call.");
272
273 m_objectValue = value;
274 }
275 }
◆ InstructionPointer
| Instruction ScriptStack.Runtime.Operand.InstructionPointer |
|
getset |
Definition at line 241 of file Operand.cs.
242 {
243 get
244 {
245 if (m_operandType !=
OperandType.InstructionPointer)
246 throw new ParserException("Error in instruction access.");
247
248 return (Instruction) m_objectValue;
249 }
250 set
251 {
252 if (m_operandType !=
OperandType.InstructionPointer)
253 throw new ParserException("Error in instruction access.");
254
255 m_objectValue = value;
256 }
257 }
◆ Member
| object ScriptStack.Runtime.Operand.Member |
|
getset |
Definition at line 209 of file Operand.cs.
210 {
211 get
212 {
214 throw new ExecutionException("Error in member access.");
215 return m_objectIndex;
216 }
217 set
218 {
220 throw new ExecutionException("Error in member access.");
221 m_objectIndex = value;
222 }
223 }
◆ Pointer
| string ScriptStack.Runtime.Operand.Pointer |
|
getset |
Definition at line 225 of file Operand.cs.
226 {
227 get
228 {
230 throw new ExecutionException("Error in array access.");
231 return (string) m_objectIndex;
232 }
233 set
234 {
236 throw new ExecutionException("Error in array access.");
237 m_objectIndex = value;
238 }
239 }
◆ RoutinePointer
| Routine ScriptStack.Runtime.Operand.RoutinePointer |
|
getset |
Definition at line 277 of file Operand.cs.
278 {
279
280 get
281 {
283 throw new ParserException("Error in routine access.");
284
285 return (Routine)m_objectValue;
286 }
287 set
288 {
290 throw new ParserException("Error in routine access.");
291
292 m_objectValue = value;
293 }
294
295 }
◆ Type
Definition at line 198 of file Operand.cs.
199 {
200 get { return m_operandType; }
201 set { m_operandType = value; }
202 }
◆ Value
| object ScriptStack.Runtime.Operand.Value |
|
get |
Definition at line 204 of file Operand.cs.
205 {
206 get { return m_objectValue; }
207 }
The documentation for this class was generated from the following file: