private ArrayCopyMethod copy_method;
public ArrayType (DataType element_type, int rank, SourceReference? source_reference) {
+ base (null);
this.element_type = element_type;
this.rank = rank;
this.source_reference = source_reference;
*/
public class Vala.BooleanType : ValueType {
public BooleanType (Struct type_symbol) {
- this.type_symbol = type_symbol;
+ base (type_symbol);
}
public override DataType copy () {
* A callable type, i.e. a delegate, method, or signal type.
*/
public abstract class Vala.CallableType : DataType {
+ protected CallableType (Symbol symbol) {
+ base.with_symbol (symbol);
+ }
+
public override string to_prototype_string (string? override_name = null) {
StringBuilder builder = new StringBuilder ();
/**
* The referred class.
*/
- public weak Class class_symbol { get; set; }
+ public weak Class class_symbol{
+ get {
+ return (Class) symbol;
+ }
+ }
public ClassType (Class class_symbol) {
- this.class_symbol = class_symbol;
+ base (class_symbol);
}
public override DataType copy () {
*/
public bool nullable { get; set; }
+ /**
+ * The referred symbol.
+ */
+ public weak Symbol? symbol { get; private set; }
+
/**
* The referred type symbol.
*/
- public weak TypeSymbol type_symbol { get; set; }
+ public weak TypeSymbol? type_symbol {
+ get {
+ return symbol as TypeSymbol;
+ }
+ }
/**
* Specifies that the expression transfers a floating reference.
private List<DataType> type_argument_list;
private static List<DataType> _empty_type_list;
+ protected DataType.with_symbol (Symbol? symbol) {
+ this.symbol = symbol;
+ }
+
/**
* Appends the specified type as generic type argument.
*
* The type of an instance of a delegate.
*/
public class Vala.DelegateType : CallableType {
- public weak Delegate delegate_symbol { get; set; }
+ public weak Delegate delegate_symbol {
+ get {
+ return (Delegate) symbol;
+ }
+ }
public bool is_called_once { get; set; }
public DelegateType (Delegate delegate_symbol) {
- this.delegate_symbol = delegate_symbol;
+ base (delegate_symbol);
this.is_called_once = (delegate_symbol.get_attribute_string ("CCode", "scope") == "async");
}
private Method? to_string_method;
public EnumValueType (Enum type_symbol) {
- this.type_symbol = type_symbol;
+ base (type_symbol);
}
public override DataType copy () {
/**
* The error domain or null for generic error.
*/
- public weak ErrorDomain? error_domain { get; set; }
+ public weak ErrorDomain? error_domain {
+ get {
+ return symbol as ErrorDomain;
+ }
+ }
/**
* The error code or null for generic error.
public bool dynamic_error { get; set; }
public ErrorType (ErrorDomain? error_domain, ErrorCode? error_code, SourceReference? source_reference = null) {
- this.error_domain = error_domain;
- this.type_symbol = error_domain;
+ base (error_domain);
this.error_code = error_code;
this.source_reference = source_reference;
}
*/
public class Vala.FloatingType : ValueType {
public FloatingType (Struct type_symbol) {
- this.type_symbol = type_symbol;
+ base (type_symbol);
}
public override DataType copy () {
string? literal_type_name;
public IntegerType (Struct type_symbol, string? literal_value = null, string? literal_type_name = null) {
- this.type_symbol = type_symbol;
+ base (type_symbol);
this.literal_value = literal_value;
this.literal_type_name = literal_type_name;
}
/**
* The referred interface.
*/
- public weak Interface interface_symbol { get; set; }
+ public weak Interface interface_symbol {
+ get {
+ return (Interface) symbol;
+ }
+ }
public InterfaceType (Interface interface_symbol) {
- this.interface_symbol = interface_symbol;
+ base (interface_symbol);
}
public override DataType copy () {
* The type of a method referencea.
*/
public class Vala.MethodType : CallableType {
- public weak Method method_symbol { get; set; }
+ public weak Method method_symbol {
+ get {
+ return (Method) symbol;
+ }
+ }
public MethodType (Method method_symbol) {
- this.method_symbol = method_symbol;
+ base (method_symbol);
}
public override bool is_invokable () {
*/
public class Vala.NullType : ReferenceType {
public NullType (SourceReference? source_reference) {
+ base (null);
this.nullable = true;
this.source_reference = source_reference;
}
/**
* The referred class or interface.
*/
- public weak ObjectTypeSymbol object_type_symbol { get; set; }
+ public weak ObjectTypeSymbol object_type_symbol {
+ get {
+ return (ObjectTypeSymbol) symbol;
+ }
+ }
public ObjectType (ObjectTypeSymbol type_symbol) {
- this.type_symbol = type_symbol;
- this.object_type_symbol = type_symbol;
+ base (type_symbol);
}
public override DataType copy () {
* A reference type, i.e. a class, interface, or array type.
*/
public abstract class Vala.ReferenceType : DataType {
+ protected ReferenceType (Symbol? symbol) {
+ base.with_symbol (symbol);
+ }
}
* The type of a signal referencea.
*/
public class Vala.SignalType : CallableType {
- public weak Signal signal_symbol { get; set; }
+ public weak Signal signal_symbol {
+ get {
+ return (Signal) symbol;
+ }
+ }
Method? connect_method;
Method? connect_after_method;
Method? disconnect_method;
public SignalType (Signal signal_symbol) {
- this.signal_symbol = signal_symbol;
+ base (signal_symbol);
}
public override bool is_invokable () {
*/
public class Vala.StructValueType : ValueType {
public StructValueType (Struct type_symbol) {
- this.type_symbol = type_symbol;
+ base (type_symbol);
}
public override bool is_invokable () {
* A value type, i.e. a struct or an enum type.
*/
public abstract class Vala.ValueType : DataType {
+ protected ValueType (TypeSymbol type_symbol) {
+ base.with_symbol (type_symbol);
+ }
+
public override bool is_disposable () {
if (!value_owned) {
return false;