static gapi_boolean _StatusConditionGetTriggerValue( _Condition _this) { _StatusCondition statuscondition = _StatusCondition(_this); gapi_statusMask currentStatus; gapi_boolean result = FALSE; /* We are accessing the entity 'status' attribute here, but we do not lock * the entity. This is safe as we do have the condition locked at this point. * and the entity can not be gone as long as the condition is locked. * the 'status' attribute of the entity is just a statusMask and even if * it were to already be reset it would be safe to access. */ if(_this->entity) { currentStatus = _StatusGetCurrentStatus(_this->entity->status) & statuscondition->enabledStatusMask; } else { currentStatus = GAPI_STATUS_KIND_NULL; } if (currentStatus) { result = TRUE; } return result; }
gapi_statusMask gapi_dataReaderView_get_status_changes( gapi_dataReaderView _this) { gapi_statusMask result = GAPI_STATUS_KIND_NULL; _DataReaderView dataReaderView; _DataReader dataReader; dataReaderView = gapi_dataReaderViewClaim(_this, NULL); if ( dataReaderView != NULL ) { dataReader = _DataReaderViewDataReader(dataReaderView); if (dataReader != NULL) { result = _StatusGetCurrentStatus(_Entity(dataReader)->status); _EntityRelease(dataReader); } _EntityRelease(dataReaderView); } return result; }