AttrValue(Id: String, Var Success: Boolean): Variant;
AttrValue(System.String, System.Boolean): System.Object;
Id. Attribute identifier.
Success. Indicates whether attribute has available value. The parameter takes values:
True. The function returns the specified value of the requested attribute. Access calculation result depends on the returned attribute value.
False. Access calculation result by requested attribute values is not determined.
The AttrValue method returns attribute value.
The method is set as a function:
Public Class Callback:Object, IABACEvaluateCallback
Public Function AttrValueRaw(Id: String; Var Result: Variant): Boolean;
Var
Success: Boolean;
Begin
If Id = "<attribute identifier>" Then
Result := <attribute value>;
Success := True;
Else
Success := False;
End If;
Return Success;
End Function AttrValueRaw;
Public Function AttrValue(Id: String; Var Success: Boolean): Variant;
Begin
Success := False;
Return Null;
End Function AttrValue;
End Class Callback;
Public Class Callback:Object, IABACEvaluateCallback
Public Function AttrValueRaw(Id: String; Result: IntPtr): SByte;
Var
Success: SByte;
Begin
If Id = "<attribute identifier>" Then
Result := <attribute value> As IntPtr;
Success := 1;
Else
Success := 0;
Result := Null As IntPtr;
End If;
Return Success;
End Function AttrValueRaw;
Public Function AttrValue(Id: String; Var Success: Boolean): Object;
Var
Result: Object;
Begin
If Id = "<attribute identifier>" Then
Result := <attribute value> As Object;
Success := True;
Else
Success := False;
Result :=0;
End If;
Return Result;
End Function AttrValue;
End Class Callback;
If attribute value is empty and is not set in the AttrValue function, the attribute-based access control calculator skips the empty attribute. Make sure that all attributes have value or set checking values of all attributes in the function.
The method use is given in the example for IABACEngine.Evaluate.
See also: