private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
if (element.construction) {
+ if (element.writable) {
+ return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
+ }
return PropertyAccessorType.CONSTRUCT;
} else if (element.writable) {
return PropertyAccessorType.SET;
*/
public bool is_construct {
get {
- return type == PropertyAccessorType.CONSTRUCT;
+ return (type & PropertyAccessorType.CONSTRUCT) != 0;
}
}
*/
public bool is_set {
get {
- return type == PropertyAccessorType.SET;
+ return (type & PropertyAccessorType.SET) != 0;
}
}
*/
public bool is_get {
get {
- return type == PropertyAccessorType.GET;
+ return (type & PropertyAccessorType.GET) != 0;
}
}
*/
public enum Valadoc.Api.PropertyAccessorType {
- CONSTRUCT,
- SET,
- GET;
+ CONSTRUCT = 1 << 0,
+ SET = 1 << 1,
+ GET = 1 << 2;
public string to_string () {
- switch (this) {
- case PropertyAccessorType.CONSTRUCT:
+ if ((this & PropertyAccessorType.CONSTRUCT) != 0) {
+ if ((this & PropertyAccessorType.SET) != 0) {
+ return "construct set";
+ }
return "construct";
-
- case PropertyAccessorType.SET:
+ } else if ((this & PropertyAccessorType.SET) != 0) {
return "set";
-
- case PropertyAccessorType.GET:
+ } else if ((this & PropertyAccessorType.GET) != 0) {
return "get";
}