Пример #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("");
 }
Пример #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("");
 }
Пример #3
0
 public TypeUnit(PawnType type, int dims)
 {
     kind_ = Kind.Array;
     type_ = type;
     dims_ = dims;
 }
Пример #4
0
 public bool equalTo(PawnType other)
 {
     return type_ == other.type_ && tag_ == other.tag_;
 }
Пример #5
0
        private TypeUnit ref_;          // kind_ == Reference

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

        public TypeUnit(PawnType type)
        {
            kind_ = Kind.Cell;
            type_ = type;
        }
Пример #8
0
 public bool equalTo(PawnType other)
 {
     return(type_ == other.type_ && tag_ == other.tag_);
 }
Пример #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 "";
 }
Пример #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 "";
 }