00001
00002 package gridlabd;
00003
00010 public class GProperty{
00011 private String name;
00012 private String type;
00013 private long size;
00014 private long offset;
00015 private long addr;
00016 public String GetName(){return name;}
00017 public String GetType(){return type;}
00018 public long GetSize(){return size;}
00019 public long GetOffset(){return offset;}
00020 public long GetAddr(){return addr;}
00021 private GProperty(String n, String t, long s, long o){
00022 name = new String(n);
00023 type = new String(t);
00024 size = s;
00025 offset = o;
00026 }
00034 public static GProperty Build(String n, String t, long o){
00035 Long size = GridlabD.proptype.get(t);
00036 GProperty p = null;
00037 if(size == null){
00038 GridlabD.error("Unable to create property \""+n+"\" of type \""+t+"\"");
00039 return null;
00040 }
00041 p = new GProperty(n, t, size.longValue(), o);
00042
00043 return p;
00044 }
00053 public static GProperty Build(String n, String t, long o, long s){
00054 return new GProperty(n, t, s, o);
00055 }
00056 }