source: trunk/org/expeditee/simple/SPointer.java@ 4

Last change on this file since 4 was 4, checked in by davidb, 16 years ago

Starting source code to Expeditee

File size: 774 bytes
Line 
1package org.expeditee.simple;
2
3public class SPointer<T> extends SVariable<T> {
4
5 public static final String framePrefix = SVariable.prefix + "fp"
6 + SVariable.separator;
7
8 public static final String itemPrefix = SVariable.prefix + "ip"
9 + SVariable.separator;
10
11 public static final String filePrefix = SVariable.prefix + "f"
12 + SVariable.separator;
13
14 public SPointer(String name, T value) {
15 super(name, value);
16 }
17
18 public void setValue(T newValue) {
19 value_ = newValue;
20 }
21
22 @Override
23 public String stringValue() {
24 return value_.toString();
25 }
26
27 @Override
28 public void setValue(SVariable<T> v) throws Exception {
29 if (v instanceof SPointer) {
30 setValue(v.getValue());
31 return;
32 }
33 throw new Exception("Can not set pointer variable with primitive");
34 }
35}
Note: See TracBrowser for help on using the repository browser.