private static UhpType NewDiscrete(long? start, long? size) { UhpType type = new UhpType(BaseType.DISCRETE); type.discRangeStart = start; type.discRangeSize = size; return type; }
private static UhpType NewContinuous(double? start, double? size) { UhpType type = new UhpType(BaseType.CONTINUOUS); type.contRangeStart = start; type.contRangeSize = size; return type; }
public static UhpType Struct(Dictionary<string, UhpType> fields) { UhpType type = new UhpType(BaseType.STRUCTURED); type.fields = fields; return type; }
public void AddField(string name, UhpType type) { if (fields == null) fields = new Dictionary<string, UhpType>(); fields[name] = type; }
public static UhpType Array(UhpType elementType, int dimension) { UhpType type = new UhpType(BaseType.ARRAY); type.elementType = elementType; type.dimension = dimension; return type; }