Libosinfo.Filter¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Libosinfo.Filter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a filter object
- Return type:
Construct a new filter that matches all entities
- add_constraint(propName, propVal)¶
- Parameters:
Adds a constraint that requires the entity to have a property key propName with a value of propVal. If multiple constraints are added for the same propName, with different values, the entity have all property values.
- clear_constraint(propName)¶
- Parameters:
propName (
str
) – name of the key to remove constraints for
Remove all filter constraints for the matching property name.
- clear_constraints()¶
Remove all filter property constraints
- get_constraint_keys()¶
- Returns:
List of constraint keys
- Return type:
[
str
]
Get a list of all constraint property keys
- get_constraint_values(propName)¶
- Parameters:
propName (
str
) – the name of the key- Returns:
List of constraint values
- Return type:
[
str
]
Get a list values for filter constraints with the named key
- matches(entity)¶
- Parameters:
entity (
Libosinfo.Entity
) – an entity to query- Returns:
- Return type:
Determine of an entity matches a filter
- do_matches(entity) virtual¶
- Parameters:
entity (
Libosinfo.Entity
) – an entity to query- Returns:
- Return type:
Determine of an entity matches a filter