Fix all attributes macroses
This commit is contained in:
parent
030b97c891
commit
3357ee85cd
1 changed files with 10 additions and 10 deletions
|
|
@ -195,42 +195,42 @@
|
|||
|
||||
%define %attribute(Class, AttributeType, AttributeName, GetMethod, SetMethod...)
|
||||
#if #SetMethod != ""
|
||||
%attribute_custom(Class, AttributeType, AttributeName, GetMethod, SetMethod, self_->GetMethod(), self_->SetMethod(val_))
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, GetMethod, SetMethod, self_->GetMethod(), self_->SetMethod(val_))
|
||||
#else
|
||||
%attribute_readonly(Class, AttributeType, AttributeName, GetMethod, self_->GetMethod())
|
||||
%attribute_readonly(%arg(Class), AttributeType, AttributeName, GetMethod, self_->GetMethod())
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
%define %attribute2(Class, AttributeType, AttributeName, GetMethod, SetMethod...)
|
||||
#if #SetMethod != ""
|
||||
%attribute_custom(Class, AttributeType, AttributeName, GetMethod, SetMethod, &self_->GetMethod(), self_->SetMethod(*val_))
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, GetMethod, SetMethod, &self_->GetMethod(), self_->SetMethod(*val_))
|
||||
#else
|
||||
%attribute_readonly(Class, AttributeType, AttributeName, GetMethod, &self_->GetMethod())
|
||||
%attribute_readonly(%arg(Class), AttributeType, AttributeName, GetMethod, &self_->GetMethod())
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
%define %attributeref(Class, AttributeType, AttributeName, AccessorMethod...)
|
||||
#if #AccessorMethod != ""
|
||||
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
#else
|
||||
%attribute_custom(Class, AttributeType, AttributeName, AttributeName, AttributeName, self_->AttributeName(), self_->AttributeName() = val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, AttributeName, AttributeName, self_->AttributeName(), self_->AttributeName() = val_)
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
%define %attribute2ref(Class, AttributeType, AttributeName, AccessorMethod...)
|
||||
#if #AccessorMethod != ""
|
||||
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, &self_->AccessorMethod(), self_->AccessorMethod() = *val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, &self_->AccessorMethod(), self_->AccessorMethod() = *val_)
|
||||
#else
|
||||
%attribute_custom(Class, AttributeType, AccessorName, AccessorName, AccessorName, &self_->AccessorName(), self_->AccessorName() = *val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AccessorName, AccessorName, AccessorName, &self_->AccessorName(), self_->AccessorName() = *val_)
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
// deprecated (same as %attributeref, but there is an argument order inconsistency)
|
||||
%define %attribute_ref(Class, AttributeType, AccessorMethod, AttributeName...)
|
||||
#if #AttributeName != ""
|
||||
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
#else
|
||||
%attribute_custom(Class, AttributeType, AccessorMethod, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
%attribute_custom(%arg(Class), AttributeType, AccessorMethod, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue