Beispiel #1
0
 private string buildConTag(PawnType type)
 {
     if (type.type == CellType.Bool)
     {
         return("view_as<bool>");
     }
     if (type.type == CellType.Float)
     {
         return("view_as<float>");
     }
     if (type.type == CellType.Tag)
     {
         return(buildConTag(type.tag));
     }
     return("");
 }
Beispiel #2
0
 private string buildTag(PawnType type)
 {
     if (type.type == CellType.Bool)
     {
         return("bool ");
     }
     if (type.type == CellType.Float)
     {
         return("float ");
     }
     if (type.type == CellType.Tag)
     {
         return(buildTag(type.tag));
     }
     return("");
 }
Beispiel #3
0
 public TypeUnit(PawnType type, int dims)
 {
     kind_ = Kind.Array;
     type_ = type;
     dims_ = dims;
 }
Beispiel #4
0
 public bool equalTo(PawnType other)
 {
     return type_ == other.type_ && tag_ == other.tag_;
 }
Beispiel #5
0
        private TypeUnit ref_;          // kind_ == Reference

        public TypeUnit(PawnType type)
        {
            kind_ = Kind.Cell;
            type_ = type;
        }
Beispiel #6
0
 public TypeUnit(PawnType type, int dims)
 {
     kind_ = Kind.Array;
     type_ = type;
     dims_ = dims;
 }
Beispiel #7
0
        private TypeUnit ref_;          // kind_ == Reference

        public TypeUnit(PawnType type)
        {
            kind_ = Kind.Cell;
            type_ = type;
        }
Beispiel #8
0
 public bool equalTo(PawnType other)
 {
     return(type_ == other.type_ && tag_ == other.tag_);
 }
Beispiel #9
0
 private string buildConTag(PawnType type)
 {
     if (type.type == CellType.Bool)
         return "view_as<bool>";
     if (type.type == CellType.Float)
         return "view_as<float>";
     if (type.type == CellType.Tag)
         return buildConTag(type.tag);
     return "";
 }
Beispiel #10
0
 private string buildTag(PawnType type)
 {
     if (type.type == CellType.Bool)
         return "bool ";
     if (type.type == CellType.Float)
         return "float ";
     if (type.type == CellType.Tag)
         return buildTag(type.tag);
     return "";
 }