Specifies which devices to match or what condition have to be met for the rule to be aplicable.
More...
|
| | Attribute (const char *name) |
| | Constructs new rule attribute with a given name and default set operator. More...
|
| |
| | Attribute (const Attribute< ValueType > &rhs)=default |
| | Default copy constructor. More...
|
| |
| Attribute & | operator= (const Attribute< ValueType > &rhs)=default |
| | Default copy assignment. More...
|
| |
| void | setSetOperator (SetOperator op) |
| | Sets set operator. More...
|
| |
| SetOperator | setOperator () const |
| | Returns set operator of this attribute. More...
|
| |
| void | append (ValueType &&value) |
| | Appends new value into attribute values using move semantics. More...
|
| |
| void | append (const ValueType &value) |
| | Appends new value into attribute values. More...
|
| |
| size_t | count () const |
| | Returns number of values of this attribute. More...
|
| |
| bool | empty () const |
| | Checks whether attribute does not contain any values. More...
|
| |
| void | clear () |
| | Clears all values of this attribute and sets set operator to default. More...
|
| |
| std::string | getName () const |
| | Returns name of the attribute. More...
|
| |
| const ValueType & | get () const |
| | Returns value of single-value attribute. More...
|
| |
| const ValueType & | get (size_t index) const |
| | Returns value at given index in values vector. More...
|
| |
| void | set (ValueType &&value) |
| | Sets value in single-value attribute using move semantics. More...
|
| |
| void | set (const ValueType &value) |
| | Sets value in single-value attribute. More...
|
| |
| void | set (const std::vector< ValueType > &values, SetOperator op) |
| | Sets given values and set operator. More...
|
| |
| bool | appliesTo (const Attribute< ValueType > &target) const |
| | Checks whether attribute applies to target attribute. More...
|
| |
| std::string | toRuleString () const |
| | Returns string representation of this attribute. More...
|
| |
| const std::vector< ValueType > & | values () const |
| | Returns imutable vector of attribute values. More...
|
| |
| std::vector< ValueType > & | values () |
| | Returns mutable vector of attribute values. More...
|
| |
template<class ValueType>
class usbguard::Rule::Attribute< ValueType >
Specifies which devices to match or what condition have to be met for the rule to be aplicable.
Attribute can be either single valued or multi-valued in which case set operator may be used to allow finer definition of the rule.
template<class ValueType>
Checks whether attribute applies to target attribute.
In other words, checks whether values of this attribute satisfy set operator against target attribute values.
For example if this.values = { v1 } and target.values = { v1, v2 }, then { v1 } OneOf { v1, v2 } = True.
- Parameters
-
| target | Target attribute to apply to. |
- Exceptions
-
| USBGUARD_BUG | If attributes set operator is invalid. |