Infinity.AclMask¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| mask | [ int] | r/w | A 256 bit wide bitfield of Infinity.AclSettings. | 
Methods¶
| and1(setting) | |
| and_(rhs) | |
| clear() | |
| copy() | |
| empty() | |
| equal(rhs) | |
| free() | |
| has(setting) | |
| neg() | |
| or1(setting) | |
| or_(rhs) | |
| set1(setting) | |
| setv(settings) | 
Details¶
- 
class Infinity.AclMask¶
- This structure represents a mask of - Infinity.AclSettings, where each setting can be either turned on or off.- 
and1(setting)¶
- Parameters: - setting ( - Infinity.AclSetting) – The setting to unset.- Returns: - The mask itself. - Return type: - Infinity.AclMask- Disables the bit corresponding to setting in self, leaving all other bits alone. 
 - 
and_(rhs)¶
- Parameters: - rhs ( - Infinity.AclMask) – Second mask.- Returns: - The output mask. - out: - Output mask. - Return type: - ( - Infinity.AclMask, out:- Infinity.AclMask)- Computes the bitwise AND of self and rhs and writes the result to out. out is allowed to be equivalent to self and/or rhs. 
 - 
clear()¶
- Resets a mask so that all fields are zero. 
 - 
copy()¶
- Returns: - A new - Infinity.AclMask. Free with- Infinity.AclMask.free() when no longer needed.- Return type: - Infinity.AclMask- Creates a dynamically allocated copy of self. This function should not usually be used since masks can simply created on the stack and copied by value. This function is mainly meant for the boxed type definition and for language bindings. 
 - 
empty()¶
- Returns: - Trueif self has all fields zero, or- Falseotherwies.- Return type: - bool- Checks whether the given mask is empty, i.e. all fields are set to zero. 
 - 
equal(rhs)¶
- Parameters: - rhs ( - Infinity.AclMask) – The second mask.- Returns: - Trueif self and rhs are equal or- Falseotherwise.- Return type: - bool- Checks whether the two masks are equal. 
 - 
free()¶
- Releases a - Infinity.AclMaskthat was created with- Infinity.AclMask.copy().
 - 
has(setting)¶
- Parameters: - setting ( - Infinity.AclSetting) – The setting to check.- Returns: - Trueif the bit corresponding to setting is set in self.- Return type: - bool- Returns - Trueif the given mask has the bit which corresponds to setting set, or- Falseotherwise.
 - 
neg()¶
- Returns: - The output mask. - out: - The output mask. - Return type: - ( - Infinity.AclMask, out:- Infinity.AclMask)- Negates the given mask bitwise and writes the result to out. The output mask is allowed to be equivalent to self itself. 
 - 
or1(setting)¶
- Parameters: - setting ( - Infinity.AclSetting) – The setting to add.- Returns: - The mask itself. - Return type: - Infinity.AclMask- Enables the bit corresponding to setting in self, leaving all other bits alone. 
 - 
or_(rhs)¶
- Parameters: - rhs ( - Infinity.AclMask) – Second mask.- Returns: - The output mask. - out: - Output mask. - Return type: - ( - Infinity.AclMask, out:- Infinity.AclMask)- Computes the bitwise OR of self and rhs and writes the result to out. out is allowed to be equivalent to self and/or rhs. 
 - 
set1(setting)¶
- Parameters: - setting ( - Infinity.AclSetting) – The permission to set.- Returns: - The mask itself. - Return type: - Infinity.AclMask- Initializes self such that all permissions are off except the one corresponding to setting. 
 - 
setv(settings)¶
- Parameters: - settings ([ - Infinity.AclSetting]) – An array of- Infinity.AclSettings to set.- Returns: - The mask itself. - Return type: - Infinity.AclMask- Initializes self such that all permissions are off except the ones specified in the settings array. 
 
-